mirror of
				https://github.com/yuzu-emu/mbedtls.git
				synced 2025-11-04 11:55:04 +00:00 
			
		
		
		
	Normalize whitespace
Normalize whitespace to Mbed TLS standards. There are only whitespace changes in this commit.
This commit is contained in:
		
							parent
							
								
									6de7a179c8
								
							
						
					
					
						commit
						2d2778650b
					
				| 
						 | 
					@ -84,7 +84,8 @@ struct psa_hash_operation_s
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct {
 | 
					typedef struct
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
        /** The hash context. */
 | 
					        /** The hash context. */
 | 
				
			||||||
        struct psa_hash_operation_s hash_ctx;
 | 
					        struct psa_hash_operation_s hash_ctx;
 | 
				
			||||||
        /** The HMAC part of the context. */
 | 
					        /** The HMAC part of the context. */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -94,12 +94,15 @@ static inline int safer_memcmp( const uint8_t *a, const uint8_t *b, size_t n )
 | 
				
			||||||
 * The value is a compile-time constant for now, for simplicity. */
 | 
					 * The value is a compile-time constant for now, for simplicity. */
 | 
				
			||||||
#define MBEDTLS_PSA_KEY_SLOT_COUNT 32
 | 
					#define MBEDTLS_PSA_KEY_SLOT_COUNT 32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct {
 | 
					typedef struct
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
    psa_key_type_t type;
 | 
					    psa_key_type_t type;
 | 
				
			||||||
    psa_key_policy_t policy;
 | 
					    psa_key_policy_t policy;
 | 
				
			||||||
    psa_key_lifetime_t lifetime;
 | 
					    psa_key_lifetime_t lifetime;
 | 
				
			||||||
    union {
 | 
					    union
 | 
				
			||||||
        struct raw_data {
 | 
					    {
 | 
				
			||||||
 | 
					        struct raw_data
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            uint8_t *data;
 | 
					            uint8_t *data;
 | 
				
			||||||
            size_t bytes;
 | 
					            size_t bytes;
 | 
				
			||||||
        } raw;
 | 
					        } raw;
 | 
				
			||||||
| 
						 | 
					@ -112,7 +115,8 @@ typedef struct {
 | 
				
			||||||
    } data;
 | 
					    } data;
 | 
				
			||||||
} key_slot_t;
 | 
					} key_slot_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct {
 | 
					typedef struct
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
    int initialized;
 | 
					    int initialized;
 | 
				
			||||||
    mbedtls_entropy_context entropy;
 | 
					    mbedtls_entropy_context entropy;
 | 
				
			||||||
    mbedtls_ctr_drbg_context ctr_drbg;
 | 
					    mbedtls_ctr_drbg_context ctr_drbg;
 | 
				
			||||||
| 
						 | 
					@ -1032,8 +1036,7 @@ psa_status_t psa_mac_abort( psa_mac_operation_t *operation )
 | 
				
			||||||
                    return( PSA_ERROR_NOT_SUPPORTED );
 | 
					                    return( PSA_ERROR_NOT_SUPPORTED );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                psa_hash_abort( &operation->ctx.hmac.hash_ctx );
 | 
					                psa_hash_abort( &operation->ctx.hmac.hash_ctx );
 | 
				
			||||||
                mbedtls_zeroize( operation->ctx.hmac.opad,
 | 
					                mbedtls_zeroize( operation->ctx.hmac.opad, block_size );
 | 
				
			||||||
                                     block_size);
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
#endif /* MBEDTLS_MD_C */
 | 
					#endif /* MBEDTLS_MD_C */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1039,8 +1039,8 @@ void sign_deterministic( int key_type_arg, data_t *key_data,
 | 
				
			||||||
                                      signature, signature_size,
 | 
					                                      signature, signature_size,
 | 
				
			||||||
                                      &signature_length ) == PSA_SUCCESS );
 | 
					                                      &signature_length ) == PSA_SUCCESS );
 | 
				
			||||||
    TEST_ASSERT( signature_length == (size_t) output_data->len );
 | 
					    TEST_ASSERT( signature_length == (size_t) output_data->len );
 | 
				
			||||||
    TEST_ASSERT( memcmp( signature, output_data->x, (size_t) output_data->len )
 | 
					    TEST_ASSERT( memcmp( signature, output_data->x,
 | 
				
			||||||
                        == 0 );
 | 
					                         (size_t) output_data->len ) == 0 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exit:
 | 
					exit:
 | 
				
			||||||
    psa_destroy_key( slot );
 | 
					    psa_destroy_key( slot );
 | 
				
			||||||
| 
						 | 
					@ -1162,7 +1162,9 @@ void key_policy_fail( int usage_arg, int alg_arg, int expected_status,
 | 
				
			||||||
                                     keypair->x, (size_t) keypair->len ) ==
 | 
					                                     keypair->x, (size_t) keypair->len ) ==
 | 
				
			||||||
                     PSA_SUCCESS );
 | 
					                     PSA_SUCCESS );
 | 
				
			||||||
        actual_status = psa_asymmetric_sign( key_slot,
 | 
					        actual_status = psa_asymmetric_sign( key_slot,
 | 
				
			||||||
                        ( psa_algorithm_t )alg_arg, NULL, 0, NULL, 0, 
 | 
					                                             (psa_algorithm_t) alg_arg,
 | 
				
			||||||
 | 
					                                             NULL, 0,
 | 
				
			||||||
 | 
					                                             NULL, 0,
 | 
				
			||||||
                                             NULL, 0, &signature_length );
 | 
					                                             NULL, 0, &signature_length );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue