mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 23:18:13 +00:00
Fix whitespace at EOL issues
This commit is contained in:
parent
03dde85c3b
commit
e670f90e48
5 changed files with 12 additions and 12 deletions
|
@ -2014,9 +2014,9 @@ static int x509_crt_verify_child(
|
|||
unsigned char hash[MBEDTLS_MD_MAX_SIZE];
|
||||
mbedtls_x509_crt *grandparent;
|
||||
const mbedtls_md_info_t *md_info;
|
||||
|
||||
|
||||
/* Counting intermediate self signed certificates */
|
||||
if( ( path_cnt != 0 ) && x509_name_cmp( &child->issuer, &child->subject ) == 0 )
|
||||
if( ( path_cnt != 0 ) && x509_name_cmp( &child->issuer, &child->subject ) == 0 )
|
||||
self_cnt++;
|
||||
|
||||
/* path_cnt is 0 for the first intermediate CA */
|
||||
|
@ -2092,7 +2092,7 @@ static int x509_crt_verify_child(
|
|||
{
|
||||
/* +2 because the current step is not yet accounted for
|
||||
* and because max_pathlen is one higher than it should be.
|
||||
* Also self signed certificates do not count to the limit. */
|
||||
* Also self signed certificates do not count to the limit. */
|
||||
if( grandparent->max_pathlen > 0 &&
|
||||
grandparent->max_pathlen < 2 + path_cnt - self_cnt )
|
||||
{
|
||||
|
@ -2243,7 +2243,7 @@ int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt,
|
|||
for( parent = crt->next; parent != NULL; parent = parent->next )
|
||||
{
|
||||
/* +2 because the current step is not yet accounted for
|
||||
* and because max_pathlen is one higher than it should be */
|
||||
* and because max_pathlen is one higher than it should be */
|
||||
if( parent->max_pathlen > 0 &&
|
||||
parent->max_pathlen < 2 + pathlen )
|
||||
{
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue