mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-04-06 12:35:36 +02:00
Parse signatureAlgorithm of OCSP response
Populate the function x509_ocsp_get_sig_alg() that parses the
signatureAlgorithm from the BasicOCSPResponse ASN.1 structure. The
parsing is actually done by the preexisting functions:
* mbedtls_x509_get_alg()
* mbedtls_x509_get_sig_alg()
This commit is contained in:
committed by
Andres Amaya Garcia
parent
647a62133d
commit
77c0c8e9a2
@@ -763,6 +763,22 @@ static int x509_ocsp_get_sig_alg( mbedtls_x509_ocsp_response *resp,
|
||||
unsigned char **p,
|
||||
const unsigned char *end )
|
||||
{
|
||||
int ret;
|
||||
mbedtls_x509_buf sig_params;
|
||||
|
||||
if( ( ret = mbedtls_x509_get_alg( p, end, &resp->sig_oid,
|
||||
&sig_params ) ) != 0 )
|
||||
{
|
||||
return( ret );
|
||||
}
|
||||
|
||||
if( ( ret = mbedtls_x509_get_sig_alg( &resp->sig_oid, &sig_params,
|
||||
&resp->sig_md, &resp->sig_pk,
|
||||
&resp->sig_opts ) ) != 0 )
|
||||
{
|
||||
return( ret );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user