diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2006-11-13 13:21:47 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2006-11-13 13:21:47 +0000 |
commit | 28b987aec9474e8c0cf1cc12273018edf3a1eca1 (patch) | |
tree | 0410e5d584ecc7ad8184ae889cb967e1a0928eeb /crypto/ocsp | |
parent | fb596f3bb78bcbeb6831a6454c481563708ef2b3 (diff) | |
download | openssl-28b987aec9474e8c0cf1cc12273018edf3a1eca1.tar.gz |
Don't assume requestorName is present for signed requests. ASN1 OCSP module
fix: certs field is OPTIONAL.
Diffstat (limited to 'crypto/ocsp')
-rw-r--r-- | crypto/ocsp/ocsp_asn.c | 2 | ||||
-rw-r--r-- | crypto/ocsp/ocsp_vfy.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ocsp/ocsp_asn.c b/crypto/ocsp/ocsp_asn.c index 6a3a360d54..39b7a1c568 100644 --- a/crypto/ocsp/ocsp_asn.c +++ b/crypto/ocsp/ocsp_asn.c @@ -62,7 +62,7 @@ ASN1_SEQUENCE(OCSP_SIGNATURE) = { ASN1_SIMPLE(OCSP_SIGNATURE, signatureAlgorithm, X509_ALGOR), ASN1_SIMPLE(OCSP_SIGNATURE, signature, ASN1_BIT_STRING), - ASN1_EXP_SEQUENCE_OF(OCSP_SIGNATURE, certs, X509, 0) + ASN1_EXP_SEQUENCE_OF_OPT(OCSP_SIGNATURE, certs, X509, 0) } ASN1_SEQUENCE_END(OCSP_SIGNATURE) IMPLEMENT_ASN1_FUNCTIONS(OCSP_SIGNATURE) diff --git a/crypto/ocsp/ocsp_vfy.c b/crypto/ocsp/ocsp_vfy.c index 3d58dfb06c..23ea41c847 100644 --- a/crypto/ocsp/ocsp_vfy.c +++ b/crypto/ocsp/ocsp_vfy.c @@ -367,7 +367,7 @@ int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, X509_STORE *st return 0; } gen = req->tbsRequest->requestorName; - if (gen->type != GEN_DIRNAME) + if (!gen || gen->type != GEN_DIRNAME) { OCSPerr(OCSP_F_OCSP_REQUEST_VERIFY, OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE); return 0; |