mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Fix whitespace at EOL issues
This commit is contained in:
@ -212,7 +212,7 @@ typedef struct
|
||||
* This function returns random based on a buffer it receives.
|
||||
*
|
||||
* rng_state shall be a pointer to a rnd_buf_info structure.
|
||||
*
|
||||
*
|
||||
* The number of bytes released from the buffer on each call to
|
||||
* the random function is specified by per_call. (Can be between
|
||||
* 1 and 4)
|
||||
|
@ -89,7 +89,7 @@ void mbedtls_mpi_write_binary( int radix_X, char *input_X, char *input_A,
|
||||
mbedtls_mpi_init( &X );
|
||||
|
||||
TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 );
|
||||
|
||||
|
||||
buflen = mbedtls_mpi_size( &X );
|
||||
if( buflen > (size_t) output_size )
|
||||
buflen = (size_t) output_size;
|
||||
@ -542,7 +542,7 @@ void mbedtls_mpi_sub_abs( int radix_X, char *input_X, int radix_Y, char *input_Y
|
||||
TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 );
|
||||
TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 );
|
||||
TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
|
||||
|
||||
|
||||
res = mbedtls_mpi_sub_abs( &Z, &X, &Y );
|
||||
TEST_ASSERT( res == sub_result );
|
||||
if( res == 0 )
|
||||
|
@ -788,7 +788,7 @@ X509 Certificate ASN1 (TBSCertificate, valid version tag, invalid length)
|
||||
x509parse_crt:"30163014a012021000000000000000000000000000000000":"":MBEDTLS_ERR_X509_INVALID_VERSION + MBEDTLS_ERR_ASN1_INVALID_LENGTH
|
||||
|
||||
X509 Certificate ASN1 (TBSCertificate, valid version tag, no serial)
|
||||
x509parse_crt:"30073005a003020104":"":MBEDTLS_ERR_X509_INVALID_SERIAL + MBEDTLS_ERR_ASN1_OUT_OF_DATA
|
||||
x509parse_crt:"30073005a003020104":"":MBEDTLS_ERR_X509_INVALID_SERIAL + MBEDTLS_ERR_ASN1_OUT_OF_DATA
|
||||
|
||||
X509 Certificate ASN1 (TBSCertificate, invalid length version tag)
|
||||
x509parse_crt:"30083006a00402010400":"":MBEDTLS_ERR_X509_INVALID_VERSION + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
|
||||
|
@ -433,16 +433,16 @@ void mbedtls_x509_crt_verify_chain( char *chain_paths, char *trusted_ca, int fl
|
||||
char* act;
|
||||
uint32_t flags;
|
||||
int result, res;
|
||||
mbedtls_x509_crt trusted, chain;
|
||||
mbedtls_x509_crt trusted, chain;
|
||||
|
||||
result= flags_result?MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:0;
|
||||
|
||||
mbedtls_x509_crt_init( &chain );
|
||||
mbedtls_x509_crt_init( &trusted );
|
||||
|
||||
while( (act = strsep( &chain_paths, " " )) )
|
||||
TEST_ASSERT( mbedtls_x509_crt_parse_file( &chain, act ) == 0 );
|
||||
TEST_ASSERT( mbedtls_x509_crt_parse_file( &trusted, trusted_ca ) == 0 );
|
||||
while( (act = strsep( &chain_paths, " " )) )
|
||||
TEST_ASSERT( mbedtls_x509_crt_parse_file( &chain, act ) == 0 );
|
||||
TEST_ASSERT( mbedtls_x509_crt_parse_file( &trusted, trusted_ca ) == 0 );
|
||||
|
||||
res = mbedtls_x509_crt_verify( &chain, &trusted, NULL, NULL, &flags, NULL, NULL );
|
||||
|
||||
|
Reference in New Issue
Block a user