mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:45:42 +01:00
- Handle empty certificate subject names
This commit is contained in:
parent
e4791f3936
commit
cefb396a77
@ -39,6 +39,7 @@ Bugfix
|
||||
#52)
|
||||
* Handle encryption with private key and decryption with public key as per
|
||||
RFC 2313
|
||||
* Handle empty certificate subject names
|
||||
|
||||
Security
|
||||
* Fixed potential memory corruption on miscrafted client messages (found by
|
||||
|
@ -1263,7 +1263,7 @@ int x509parse_crt_der( x509_cert *crt, const unsigned char *buf, size_t buflen )
|
||||
return( POLARSSL_ERR_X509_CERT_INVALID_FORMAT + ret );
|
||||
}
|
||||
|
||||
if( ( ret = x509_get_name( &p, p + len, &crt->subject ) ) != 0 )
|
||||
if( len && ( ret = x509_get_name( &p, p + len, &crt->subject ) ) != 0 )
|
||||
{
|
||||
x509_free( crt );
|
||||
return( ret );
|
||||
@ -2518,6 +2518,12 @@ int x509parse_dn_gets( char *buf, size_t size, const x509_name *dn )
|
||||
|
||||
while( name != NULL )
|
||||
{
|
||||
if( !name->oid.p )
|
||||
{
|
||||
name = name->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
if( name != dn )
|
||||
{
|
||||
ret = snprintf( p, n, ", " );
|
||||
|
Loading…
Reference in New Issue
Block a user