Rename x509_ocsp_response functions to fit pattern

Rename the following functions in x509_ocsp.h and x509_ocsp.c to fit
the calling convention in other X.509 components (e.g CRL and CRT):

* mbedtls_x509_ocsp_parse_response -> mbedtls_x509_ocsp_response_parse
* mbedtls_x509_ocsp_parse_response_file -> mbedtls_x509_ocsp_response_parse_file
This commit is contained in:
Andres Amaya Garcia
2018-01-17 10:52:27 +00:00
parent b3b380d700
commit 22b7c1745f
3 changed files with 6 additions and 6 deletions

View File

@@ -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 */

View File

@@ -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 );

View File

@@ -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 )
{