sha512-x86_64.pl: fix linking problem under Windows.
[openssl.git] / crypto / ocsp / ocsp_ht.c
index de34a91c5398867e8c1e26547b7d2de1774be1db..bac35f8de156eea5a2e24fc2edf082c9b36c9cee 100644 (file)
@@ -233,8 +233,8 @@ int OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx,
        return 1;
        }
 
-OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req,
-                                                               int maxline)
+OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req,
+                              int maxline)
        {
 
        OCSP_REQ_CTX *rctx = NULL;
@@ -563,7 +563,7 @@ int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx)
 
 /* Blocking OCSP request handler: now a special case of non-blocking I/O */
 
-OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req)
+OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req)
        {
        OCSP_RESPONSE *resp = NULL;
        OCSP_REQ_CTX *ctx;
@@ -571,6 +571,9 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req)
 
        ctx = OCSP_sendreq_new(b, path, req, -1);
 
+       if (!ctx)
+               return NULL;
+
        do
                {
                rv = OCSP_sendreq_nbio(&resp, ctx);