mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	psa: Align naming of export internal functions
Align naming of export internal functions with the way other psa_crypto.c internal functions are named, ending with _internal. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
		
							parent
							
								
									00b7bfc2c4
								
							
						
					
					
						commit
						200a52c246
					
				@ -1481,7 +1481,7 @@ psa_status_t psa_get_key_slot_number(
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
 | 
					#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static psa_status_t psa_internal_export_key_buffer( const psa_key_slot_t *slot,
 | 
					static psa_status_t psa_export_key_buffer_internal( const psa_key_slot_t *slot,
 | 
				
			||||||
                                                    uint8_t *data,
 | 
					                                                    uint8_t *data,
 | 
				
			||||||
                                                    size_t data_size,
 | 
					                                                    size_t data_size,
 | 
				
			||||||
                                                    size_t *data_length )
 | 
					                                                    size_t *data_length )
 | 
				
			||||||
@ -1495,7 +1495,7 @@ static psa_status_t psa_internal_export_key_buffer( const psa_key_slot_t *slot,
 | 
				
			|||||||
    return( PSA_SUCCESS );
 | 
					    return( PSA_SUCCESS );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static psa_status_t psa_internal_export_key( const psa_key_slot_t *slot,
 | 
					static psa_status_t psa_export_key_internal( const psa_key_slot_t *slot,
 | 
				
			||||||
                                             uint8_t *data,
 | 
					                                             uint8_t *data,
 | 
				
			||||||
                                             size_t data_size,
 | 
					                                             size_t data_size,
 | 
				
			||||||
                                             size_t *data_length,
 | 
					                                             size_t *data_length,
 | 
				
			||||||
@ -1536,7 +1536,7 @@ static psa_status_t psa_internal_export_key( const psa_key_slot_t *slot,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if( key_type_is_raw_bytes( slot->attr.type ) )
 | 
					    if( key_type_is_raw_bytes( slot->attr.type ) )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return( psa_internal_export_key_buffer( slot, data, data_size, data_length ) );
 | 
					        return( psa_export_key_buffer_internal( slot, data, data_size, data_length ) );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else if( PSA_KEY_TYPE_IS_RSA( slot->attr.type ) ||
 | 
					    else if( PSA_KEY_TYPE_IS_RSA( slot->attr.type ) ||
 | 
				
			||||||
             PSA_KEY_TYPE_IS_ECC( slot->attr.type ) )
 | 
					             PSA_KEY_TYPE_IS_ECC( slot->attr.type ) )
 | 
				
			||||||
@ -1544,12 +1544,12 @@ static psa_status_t psa_internal_export_key( const psa_key_slot_t *slot,
 | 
				
			|||||||
        if( PSA_KEY_TYPE_IS_PUBLIC_KEY( slot->attr.type ) )
 | 
					        if( PSA_KEY_TYPE_IS_PUBLIC_KEY( slot->attr.type ) )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            /* Exporting public -> public */
 | 
					            /* Exporting public -> public */
 | 
				
			||||||
            return( psa_internal_export_key_buffer( slot, data, data_size, data_length ) );
 | 
					            return( psa_export_key_buffer_internal( slot, data, data_size, data_length ) );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if( !export_public_key )
 | 
					        else if( !export_public_key )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            /* Exporting private -> private */
 | 
					            /* Exporting private -> private */
 | 
				
			||||||
            return( psa_internal_export_key_buffer( slot, data, data_size, data_length ) );
 | 
					            return( psa_export_key_buffer_internal( slot, data, data_size, data_length ) );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* Need to export the public part of a private key,
 | 
					        /* Need to export the public part of a private key,
 | 
				
			||||||
@ -1656,7 +1656,7 @@ psa_status_t psa_export_key( mbedtls_svc_key_id_t key,
 | 
				
			|||||||
    if( status != PSA_SUCCESS )
 | 
					    if( status != PSA_SUCCESS )
 | 
				
			||||||
        return( status );
 | 
					        return( status );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    status = psa_internal_export_key( slot, data, data_size, data_length, 0 );
 | 
					    status = psa_export_key_internal( slot, data, data_size, data_length, 0 );
 | 
				
			||||||
    unlock_status = psa_unlock_key_slot( slot );
 | 
					    unlock_status = psa_unlock_key_slot( slot );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return( ( status == PSA_SUCCESS ) ? unlock_status : status );
 | 
					    return( ( status == PSA_SUCCESS ) ? unlock_status : status );
 | 
				
			||||||
@ -1682,7 +1682,7 @@ psa_status_t psa_export_public_key( mbedtls_svc_key_id_t key,
 | 
				
			|||||||
    if( status != PSA_SUCCESS )
 | 
					    if( status != PSA_SUCCESS )
 | 
				
			||||||
        return( status );
 | 
					        return( status );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    status = psa_internal_export_key( slot, data, data_size, data_length, 1 );
 | 
					    status = psa_export_key_internal( slot, data, data_size, data_length, 1 );
 | 
				
			||||||
    unlock_status = psa_unlock_key_slot( slot );
 | 
					    unlock_status = psa_unlock_key_slot( slot );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return( ( status == PSA_SUCCESS ) ? unlock_status : status );
 | 
					    return( ( status == PSA_SUCCESS ) ? unlock_status : status );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user