mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-04-05 20:15:36 +02:00
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:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user