-*- mode: troff; coding: utf-8 -*-
Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
Standard preamble:
========================================================================
..
.... \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
. ds C` "" . ds C' "" 'br\} . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.
If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.
Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF ========================================================================
Title "OSSL_HTTP_parse_url 3"
way too many mistakes in technical documents.
The following functions have been deprecated since OpenSSL 3.0, and can be hidden entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros\|(7):
.Vb 2 int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath, int *pssl); .Ve
\fBOSSL_parse_url() parses its input string url as a URL of the form \f(CW\*(C`[scheme://][userinfo@]host[:port][/path][?query][#fragment]\*(C' and splits it up into scheme, userinfo, host, port, path, query, and fragment components. The host (or server) component may be a DNS name or an IP address where IPv6 addresses should be enclosed in square brackets \*(C`[\*(C' and \*(C`]\*(C'. The port component is optional and defaults to 0. If given, it must be in decimal form. If the pport_num argument is not NULL the integer value of the port number is assigned to *pport_num on success. The path component is also optional and defaults to \*(C`/\*(C'. Each non-NULL result pointer argument pscheme, puser, phost, pport, \fIppath, pquery, and pfrag, is assigned the respective url component. On success, they are guaranteed to contain non-NULL string pointers, else NULL. It is the responsibility of the caller to free them using OPENSSL_free\|(3). If pquery is NULL, any given query component is handled as part of the path. A string returned via *ppath is guaranteed to begin with a \*(C`/\*(C' character. For absent scheme, userinfo, port, query, and fragment components an empty string is provided.
\fBOSSL_HTTP_parse_url() is a special form of OSSL_parse_url() where the scheme, if given, must be \*(C`http\*(C' or \*(C`https\*(C'. If pssl is not NULL, *pssl is assigned 1 in case parsing was successful and the scheme is \*(C`https\*(C', else 0. The port component is optional and defaults to 443 if the scheme is \*(C`https\*(C', else 80. Note that relative paths must be given with a leading \*(C`/\*(C', otherwise the first path element is interpreted as the hostname.
Calling the deprecated function OCSP_parse_url(url, host, port, path, ssl) is equivalent to OSSL_HTTP_parse_url(url, ssl, NULL, host, port, NULL, path, NULL, NULL).
\fBOSSL_parse_url(), OSSL_HTTP_parse_url(), and OCSP_parse_url() return 1 on success, 0 on error.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.