Rename back mbedtls_x509_parse_general_name->mbedtls_x509_parse_subject_alt_name

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel
2023-01-03 10:23:13 +01:00
parent 2d182cff71
commit 23be8f74d5
3 changed files with 5 additions and 5 deletions

View File

@@ -628,7 +628,7 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path );
* SAN type.
* \return Another negative value for any other failure.
*/
int mbedtls_x509_parse_general_name( const mbedtls_x509_buf *san_buf,
int mbedtls_x509_parse_subject_alt_name( const mbedtls_x509_buf *san_buf,
mbedtls_x509_subject_alternative_name *san );
#if !defined(MBEDTLS_X509_REMOVE_INFO)

View File

@@ -710,7 +710,7 @@ static int x509_get_general_names( unsigned char **p,
/*
* Check that the SAN is structured correctly.
*/
ret = mbedtls_x509_parse_general_name( &(cur->buf), &dummy_san_buf );
ret = mbedtls_x509_parse_subject_alt_name( &(cur->buf), &dummy_san_buf );
/*
* In case the extension is malformed, return an error,
* and clear the allocated sequences.
@@ -1988,7 +1988,7 @@ static int x509_info_subject_alt_name( char **buf, size_t *size,
while( cur != NULL )
{
memset( &san, 0, sizeof( san ) );
parse_ret = mbedtls_x509_parse_general_name( &cur->buf, &san );
parse_ret = mbedtls_x509_parse_subject_alt_name( &cur->buf, &san );
if( parse_ret != 0 )
{
if( parse_ret == MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE )
@@ -2079,7 +2079,7 @@ static int x509_info_subject_alt_name( char **buf, size_t *size,
return( 0 );
}
int mbedtls_x509_parse_general_name( const mbedtls_x509_buf *san_buf,
int mbedtls_x509_parse_subject_alt_name( const mbedtls_x509_buf *san_buf,
mbedtls_x509_subject_alternative_name *san )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;

View File

@@ -434,7 +434,7 @@ void x509_parse_san( char * crt_file, char * result_str )
cur = &crt.subject_alt_names;
while( cur != NULL )
{
ret = mbedtls_x509_parse_general_name( &cur->buf, &san );
ret = mbedtls_x509_parse_subject_alt_name( &cur->buf, &san );
TEST_ASSERT( ret == 0 || ret == MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE );
/*
* If san type not supported, ignore.