diff --git a/include/mbedtls/x509_ocsp.h b/include/mbedtls/x509_ocsp.h index 51d9899f8c..9d0b7d1de7 100644 --- a/include/mbedtls/x509_ocsp.h +++ b/include/mbedtls/x509_ocsp.h @@ -167,7 +167,7 @@ int mbedtls_x509_ocsp_response_info( char *buf, size_t size, * \return 0 if the ocsp response was parsed successfully, otherwise a * specific X.509 error */ -int mbedtls_x509_ocsp_parse_response( mbedtls_x509_ocsp_response *resp, +int mbedtls_x509_ocsp_response_parse( mbedtls_x509_ocsp_response *resp, const unsigned char *buf, size_t buflen ); @@ -182,7 +182,7 @@ int mbedtls_x509_ocsp_parse_response( mbedtls_x509_ocsp_response *resp, * \return 0 if the ocsp response was parsed successfully, otherwise a * specific X509 error */ -int mbedtls_x509_ocsp_parse_response_file( mbedtls_x509_ocsp_response *resp, +int mbedtls_x509_ocsp_response_parse_file( mbedtls_x509_ocsp_response *resp, const char *path ); #endif /* MBEDTLS_FS_IO */ diff --git a/library/x509_ocsp.c b/library/x509_ocsp.c index aa3373ffd6..fe1d31a7e0 100644 --- a/library/x509_ocsp.c +++ b/library/x509_ocsp.c @@ -1073,7 +1073,7 @@ static int x509_ocsp_get_response_bytes( mbedtls_x509_ocsp_response *resp, * tags) parsed matches the number of bytes consumed by its helper * functions */ -int mbedtls_x509_ocsp_parse_response( mbedtls_x509_ocsp_response *resp, +int mbedtls_x509_ocsp_response_parse( mbedtls_x509_ocsp_response *resp, const unsigned char *buf, size_t buflen ) { int ret; @@ -1567,7 +1567,7 @@ int mbedtls_x509_ocsp_response_info( char *buf, size_t size, return( 0 ); } -int mbedtls_x509_ocsp_parse_response_file( mbedtls_x509_ocsp_response *resp, +int mbedtls_x509_ocsp_response_parse_file( mbedtls_x509_ocsp_response *resp, const char *path ) { int ret; @@ -1577,7 +1577,7 @@ int mbedtls_x509_ocsp_parse_response_file( mbedtls_x509_ocsp_response *resp, if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) return( ret ); - ret = mbedtls_x509_ocsp_parse_response( resp, buf, n ); + ret = mbedtls_x509_ocsp_response_parse( resp, buf, n ); mbedtls_zeroize( buf, n ); mbedtls_free( buf ); diff --git a/tests/suites/test_suite_x509parse_ocsp.function b/tests/suites/test_suite_x509parse_ocsp.function index 9d01836106..90ed5f26a1 100644 --- a/tests/suites/test_suite_x509parse_ocsp.function +++ b/tests/suites/test_suite_x509parse_ocsp.function @@ -22,7 +22,7 @@ void x509parse_ocsp_response( char *resp_data, char *result_str, int result ) data_len = unhexify( resp_der, resp_data ); - TEST_ASSERT( mbedtls_x509_ocsp_parse_response( &resp, resp_der, + TEST_ASSERT( mbedtls_x509_ocsp_response_parse( &resp, resp_der, data_len ) == result ); if( result == 0 ) {