1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

- Allowed X509 key usage parsing to accept 4 byte values instead of the standard 1 byte version sometimes used by Microsoft. (Closes ticket #38)

This commit is contained in:
Paul Bakker
2011-11-11 15:01:31 +00:00
parent 03a30d34dc
commit cebdf17159
2 changed files with 3 additions and 1 deletions

View File

@ -749,7 +749,7 @@ static int x509_get_key_usage( unsigned char **p,
if( ( ret = asn1_get_bitstring( p, end, &bs ) ) != 0 )
return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS + ret );
if( bs.len != 1 )
if( bs.len > 1 )
return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS +
POLARSSL_ERR_ASN1_INVALID_LENGTH );