diff options
Diffstat (limited to 'doc/man3/OSSL_HTTP_parse_url.pod')
-rw-r--r-- | doc/man3/OSSL_HTTP_parse_url.pod | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/man3/OSSL_HTTP_parse_url.pod b/doc/man3/OSSL_HTTP_parse_url.pod index 559ff1dd08..5c253414ac 100644 --- a/doc/man3/OSSL_HTTP_parse_url.pod +++ b/doc/man3/OSSL_HTTP_parse_url.pod @@ -2,6 +2,7 @@ =head1 NAME +OSSL_HTTP_adapt_proxy, OSSL_parse_url, OSSL_HTTP_parse_url, OCSP_parse_url @@ -11,6 +12,9 @@ OCSP_parse_url #include <openssl/http.h> + const char *OSSL_HTTP_adapt_proxy(const char *proxy, const char *no_proxy, + const char *server, int use_ssl); + int OSSL_parse_url(const char *url, char **pscheme, char **puser, char **phost, char **pport, int *pport_num, char **ppath, char **pquery, char **pfrag); @@ -28,6 +32,19 @@ L<openssl_user_macros(7)>: =head1 DESCRIPTION +OSSL_HTTP_adapt_proxy() takes an optional proxy hostname I<proxy> +and returns it transformed according to the optional I<no_proxy> parameter, +I<server>, I<use_ssl>, and the applicable environment variable, as follows. +If I<proxy> is NULL, take any default value from the C<http_proxy> +environment variable, or from C<https_proxy> if I<use_ssl> is nonzero. +If this still does not yield a proxy hostname, +take any further default value from the C<HTTP_PROXY> +environment variable, or from C<HTTPS_PROXY> if I<use_ssl> is nonzero. +If I<no_proxy> is NULL, take any default exclusion value from the C<no_proxy> +environment variable, or else from C<NO_PROXY>. +Return the determined proxy hostname unless the exclusion contains I<server>. +Otherwise return NULL. + OSSL_parse_url() parses its input string I<url> as a URL of the form C<[scheme://][userinfo@]host[:port][/path][?query][#fragment]> and splits it up into scheme, userinfo, host, port, path, query, and fragment components. @@ -61,6 +78,10 @@ OSSL_HTTP_parse_url(url, ssl, NULL, host, port, NULL, path, NULL, NULL). =head1 RETURN VALUES +OSSL_HTTP_adapt_proxy() returns NULL if no proxy is to be used, +otherwise a constant proxy hostname string, +which is either the proxy name handed in or an environment variable value. + OSSL_parse_url(), OSSL_HTTP_parse_url(), and OCSP_parse_url() return 1 on success, 0 on error. @@ -70,6 +91,7 @@ L<OSSL_HTTP_transfer(3)> =head1 HISTORY +OSSL_HTTP_adapt_proxy(), OSSL_parse_url() and OSSL_HTTP_parse_url() were added in OpenSSL 3.0. OCSP_parse_url() was deprecated in OpenSSL 3.0. |