]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix legacy OCSP_REQ_CTX_http() function to expect ASN.1 formatted input
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Thu, 8 Jul 2021 17:44:47 +0000 (19:44 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Sun, 11 Jul 2021 15:06:12 +0000 (17:06 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16029)

include/openssl/ocsp.h.in

index a9ff4e565c051eab3b4b81300bd8ea08b26a9854..e2cc2716b56bd05666a35f1ffa26539d14bdf000 100644 (file)
@@ -180,8 +180,9 @@ typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX;
         OSSL_HTTP_REQ_CTX_new(io, io, buf_size)
 #   define OCSP_REQ_CTX_free OSSL_HTTP_REQ_CTX_free
 #   define OCSP_REQ_CTX_http(rctx, op, path) \
-        OSSL_HTTP_REQ_CTX_set_request_line(rctx, strcmp(op, "POST") == 0, \
-                                           NULL, NULL, path)
+        (OSSL_HTTP_REQ_CTX_set_expected(rctx, NULL, 1 /* asn1 */, 0, 0) && \
+         OSSL_HTTP_REQ_CTX_set_request_line(rctx, strcmp(op, "POST") == 0, \
+                                            NULL, NULL, path))
 #   define OCSP_REQ_CTX_add1_header OSSL_HTTP_REQ_CTX_add1_header
 #   define OCSP_REQ_CTX_i2d(r, it, req) \
         OSSL_HTTP_REQ_CTX_set1_req(r, "application/ocsp-request", it, req)