x509: Correctly encode nonce in OCSP request

The nonce value is encoded as OCTET STRING, however, the extension
values themselves must also be encoded as OCTET STRING.
This commit is contained in:
Tobias Brunner 2017-07-07 08:53:32 +02:00
parent 93e0898f60
commit d7dc677ee5
1 changed files with 2 additions and 1 deletions

View File

@ -209,7 +209,8 @@ static chunk_t build_nonce(private_x509_ocsp_request_t *this)
}
rng->destroy(rng);
return asn1_wrap(ASN1_SEQUENCE, "cm", ASN1_nonce_oid,
asn1_simple_object(ASN1_OCTET_STRING, this->nonce));
asn1_wrap(ASN1_OCTET_STRING, "m",
asn1_simple_object(ASN1_OCTET_STRING, this->nonce)));
}
/**