mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-24 10:35:12 +00:00
Fix coding style in x509_parse_int()
This commit is contained in:
parent
876214cd9d
commit
cf428733b8
|
@ -480,14 +480,20 @@ int x509_get_name( unsigned char **p, const unsigned char *end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int x509_parse_int(unsigned char **p, size_t n, int *res){
|
static int x509_parse_int( unsigned char **p, size_t n, int *res )
|
||||||
|
{
|
||||||
*res = 0;
|
*res = 0;
|
||||||
for( ; n > 0; --n ){
|
|
||||||
if( ( **p < '0') || ( **p > '9' ) ) return POLARSSL_ERR_X509_INVALID_DATE;
|
for( ; n > 0; --n )
|
||||||
|
{
|
||||||
|
if( ( **p < '0') || ( **p > '9' ) )
|
||||||
|
return( POLARSSL_ERR_X509_INVALID_DATE );
|
||||||
|
|
||||||
*res *= 10;
|
*res *= 10;
|
||||||
*res += (*(*p)++ - '0');
|
*res += ( *(*p)++ - '0' );
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int x509_date_is_valid(const x509_time *t)
|
static int x509_date_is_valid(const x509_time *t)
|
||||||
|
|
Loading…
Reference in a new issue