]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
OSSL_HTTP_open(): improve use of use_ssl and its documentation
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Tue, 28 Jun 2022 15:47:40 +0000 (17:47 +0200)
committerHugo Landau <hlandau@openssl.org>
Wed, 6 Jul 2022 07:21:53 +0000 (08:21 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18674)

crypto/http/http_client.c
doc/man3/OSSL_HTTP_transfer.pod

index ad7574e69554fedb45a18bf4e86dfa8b7eb16ecf..96b18dc9d38c550d90d62a4ee318ec978f327cbc 100644 (file)
@@ -975,7 +975,7 @@ OSSL_HTTP_REQ_CTX *OSSL_HTTP_open(const char *server, const char *port,
     if (bio_update_fn != NULL) {
         BIO *orig_bio = cbio;
 
-        cbio = (*bio_update_fn)(cbio, arg, 1 /* connect */, use_ssl);
+        cbio = (*bio_update_fn)(cbio, arg, 1 /* connect */, use_ssl != 0);
         if (cbio == NULL) {
             if (bio == NULL) /* cbio was not provided by caller */
                 BIO_free_all(orig_bio);
index bb29a5d3e65a3a70f977dbb45da45fe05522f0f1..e44ee9761efb3ab3017d67e37713b77d181a9daa 100644 (file)
@@ -102,8 +102,8 @@ The callback function may modify the BIO provided in the I<bio> argument,
 whereby it may make use of a custom defined argument I<arg>,
 which may for instance point to an B<SSL_CTX> structure.
 During connection establishment, just after calling BIO_do_connect_retry(), the
-callback function is invoked with the I<connect> argument being 1 and the I<detail>
-argument being 1 if HTTPS is requested, i.e., SSL/TLS should be enabled, else 0.
+callback function is invoked with the I<connect> argument being 1 and
+I<detail> being 1 if I<use_ssl> is nonzero (i.e., HTTPS is requested), else 0.
 On disconnect I<connect> is 0 and I<detail> is 1 if no error occurred, else 0.
 For instance, on connect the callback may push an SSL BIO to implement HTTPS;
 after disconnect it may do some diagnostic output and pop and free the SSL BIO.