mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Add mbedtls_x509_dn_get_next function
Allow iteration through relative DNs when X509 name contains multi- value RDNs. Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This commit is contained in:
@ -796,6 +796,15 @@ int mbedtls_x509_dn_gets( char *buf, size_t size, const mbedtls_x509_name *dn )
|
||||
return( (int) ( size - n ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the next relative DN in an X509 name.
|
||||
*/
|
||||
mbedtls_x509_name * mbedtls_x509_dn_get_next( mbedtls_x509_name * dn )
|
||||
{
|
||||
for( ; dn->next != NULL && dn->next_merged; dn = dn->next );
|
||||
return( dn->next );
|
||||
}
|
||||
|
||||
/*
|
||||
* Store the serial in printable form into buf; no more
|
||||
* than size characters will be written
|
||||
|
Reference in New Issue
Block a user