From: Dr. David von Oheimb Date: Thu, 8 Jul 2021 17:44:47 +0000 (+0200) Subject: Fix legacy OCSP_REQ_CTX_http() function to expect ASN.1 formatted input X-Git-Tag: openssl-3.0.0-beta2~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5303aa51c015ab7590187ac3e441b6d3c47a6e79;p=thirdparty%2Fopenssl.git Fix legacy OCSP_REQ_CTX_http() function to expect ASN.1 formatted input Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/16029) --- diff --git a/include/openssl/ocsp.h.in b/include/openssl/ocsp.h.in index a9ff4e565c0..e2cc2716b56 100644 --- a/include/openssl/ocsp.h.in +++ b/include/openssl/ocsp.h.in @@ -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)