]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix not backwards-compat X509_http_nbio() and X509_CRL_http_nbio()
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Mon, 25 Jan 2021 18:25:18 +0000 (19:25 +0100)
committerDr. David von Oheimb <dev@ddvo.net>
Tue, 2 Feb 2021 06:54:37 +0000 (07:54 +0100)
Provides partial fix of #13127.

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

doc/man3/X509_load_http.pod
include/openssl/x509.h.in

index 483597b5b80df3e9793f7fc8b2d12377e634cf31..47a0e74760f0d1c5e28ec44c698e2296b315f1a6 100644 (file)
@@ -15,8 +15,8 @@ X509_CRL_http_nbio
  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);
 
- #define X509_http_nbio(url)
- #define X509_CRL_http_nbio(url)
+ #define X509_http_nbio(rctx, pcert)
+ #define X509_CRL_http_nbio(rctx, pcrl)
 
 =head1 DESCRIPTION
 
index bb22abef6b72b51add3ab960fef5613c88d48fb8..8a3cb2e4d0d5939602c1107a1c41e88724f357a0 100644 (file)
@@ -403,9 +403,13 @@ int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
                      unsigned char *md, unsigned int *len);
 
 X509 *X509_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
-# define X509_http_nbio(url) X509_load_http(url, NULL, NULL, 0)
+# define X509_http_nbio(rctx, pcert) \
+    OSSL_HTTP_REQ_CTX_sendreq_d2i(rctx, (ASN1_VALUE **)(pcert), \
+                                  ASN1_ITEM_rptr(X509))
 X509_CRL *X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
-# define X509_CRL_http_nbio(url) X509_CRL_load_http(url, NULL,  NULL, 0)
+# define X509_CRL_http_nbio(rctx, pcrl) \
+    OSSL_HTTP_REQ_CTX_sendreq_d2i(rctx, (ASN1_VALUE **)(pcrl), \
+                                  ASN1_ITEM_rptr(X509_CRL))
 
 # ifndef OPENSSL_NO_STDIO
 X509 *d2i_X509_fp(FILE *fp, X509 **x509);