x509: Correctly parse nonce in OCSP response

Fixes: d7dc677ee5 ("x509: Correctly encode nonce in OCSP request")
This commit is contained in:
Tobias Brunner 2019-11-22 16:36:20 +01:00
parent 5333db58ac
commit cd0e4d5297
1 changed files with 3 additions and 1 deletions

View File

@ -577,7 +577,9 @@ static bool parse_basicOCSPResponse(private_x509_ocsp_response_t *this,
DBG2(DBG_ASN, " %s", critical ? "TRUE" : "FALSE");
break;
case BASIC_RESPONSE_EXT_VALUE:
if (extn_oid == OID_NONCE)
if (extn_oid == OID_NONCE &&
asn1_parse_simple_object(&object, ASN1_OCTET_STRING,
parser->get_level(parser)+1, "nonce"))
{
this->nonce = object;
}