Ensure that x509_ocsp_is_issuer sets issuer var

Ensure that the internal function x509_ocsp_is_issuer() sets the in/out
issuer pointer to NULL when the supplied certificate is not the issuer
of the OCSP response.
This commit is contained in:
Andres Amaya Garcia
2017-11-15 11:09:04 +00:00
parent 94fe8c196e
commit fbe751f532

View File

@@ -1226,6 +1226,8 @@ static int x509_ocsp_is_issuer( mbedtls_x509_ocsp_responder_id *responder_id,
{
int ret;
*issuer = NULL;
switch( responder_id->type )
{
case MBEDTLS_X509_OCSP_RESPONDER_ID_TYPE_NAME:
@@ -1246,8 +1248,6 @@ static int x509_ocsp_is_issuer( mbedtls_x509_ocsp_responder_id *responder_id,
return( ret );
else if( ret == 0 )
*issuer = crt;
else
*issuer = NULL;
return( 0 );