Redefine macro X509_http_nbio to avoid using ocsp.h
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
@@ -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
