mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
- Correctly handle MS certificate's key usage bits
This commit is contained in:
parent
f518b16f97
commit
94a6796179
1 changed files with 1 additions and 1 deletions
|
|
@ -765,7 +765,7 @@ static int x509_get_key_usage( unsigned char **p,
|
||||||
if( ( ret = asn1_get_bitstring( p, end, &bs ) ) != 0 )
|
if( ( ret = asn1_get_bitstring( p, end, &bs ) ) != 0 )
|
||||||
return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS + ret );
|
return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS + ret );
|
||||||
|
|
||||||
if( bs.len > 1 )
|
if( bs.len < 1 )
|
||||||
return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS +
|
return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS +
|
||||||
POLARSSL_ERR_ASN1_INVALID_LENGTH );
|
POLARSSL_ERR_ASN1_INVALID_LENGTH );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue