PR: 2411
[oweals/openssl.git] / crypto / ocsp / ocsp_vfy.c
index 3d58dfb06cf34ff940a492c97556271b9cecf5e8..4a0c3870d83a33dece479b2a90d1c8a517cfa128 100644 (file)
@@ -1,5 +1,5 @@
 /* ocsp_vfy.c */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2000.
  */
 /* ====================================================================
@@ -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;