Redefine macro X509_http_nbio to avoid using ocsp.h
authorDaniel Fiala <daniel@openssl.org>
Tue, 29 Mar 2022 18:32:42 +0000 (20:32 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 5 Apr 2022 07:21:14 +0000 (09:21 +0200)
The functions used from ocsp.h are actually just aliases
for functions from http.h. Use them directly to avoid
including ocsp.h.

Fixes openssl#17148

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17980)

(cherry picked from commit f593f32eede30ead69e0a16e47a564a664171283)

include/openssl/x509.h.in

index b4efbb55ddbab20d8e3128db25897518ec94259d..0e39c4034106b1f2bea41c517bd088ef3927e15a 100644 (file)
@@ -358,11 +358,11 @@ int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
 X509 *X509_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
 X509_CRL *X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
 # ifndef OPENSSL_NO_DEPRECATED_3_0
-#  include <openssl/ocsp.h> /* OCSP_REQ_CTX_nbio_d2i */
+#  include <openssl/http.h> /* OSSL_HTTP_REQ_CTX_nbio_d2i */
 #  define X509_http_nbio(rctx, pcert) \
-      OCSP_REQ_CTX_nbio_d2i(rctx, pcert, ASN1_ITEM_rptr(X509))
+      OSSL_HTTP_REQ_CTX_nbio_d2i(rctx, pcert, ASN1_ITEM_rptr(X509))
 #  define X509_CRL_http_nbio(rctx, pcrl) \
-      OCSP_REQ_CTX_nbio_d2i(rctx, pcrl, ASN1_ITEM_rptr(X509_CRL))
+      OSSL_HTTP_REQ_CTX_nbio_d2i(rctx, pcrl, ASN1_ITEM_rptr(X509_CRL))
 # endif
 
 # ifndef OPENSSL_NO_STDIO