summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-09-03 13:32:56 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-09-08 15:36:24 +0200
commitd7fcee3b3b5fae674f107c736f8d53610212ce4e (patch)
treeb70c2afaf2fc49d5bd36102385584b3d0c72ae66 /include
parent8d6481f532ab8c502de2ad17e09f688abb675a71 (diff)
OSSL_HTTP_parse_url(): add optional port number return parameter and strengthen documentation
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12786)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/http.h2
-rw-r--r--include/openssl/httperr.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/openssl/http.h b/include/openssl/http.h
index 45c8f11d7b..2c9ce9d86e 100644
--- a/include/openssl/http.h
+++ b/include/openssl/http.h
@@ -74,7 +74,7 @@ int OSSL_HTTP_proxy_connect(BIO *bio, const char *server, const char *port,
int timeout, BIO *bio_err, const char *prog);
int OSSL_HTTP_parse_url(const char *url, char **phost, char **pport,
- char **ppath, int *pssl);
+ int *pport_num, char **ppath, int *pssl);
# ifdef __cplusplus
}
diff --git a/include/openssl/httperr.h b/include/openssl/httperr.h
index e4acb1df8c..7747643bfa 100644
--- a/include/openssl/httperr.h
+++ b/include/openssl/httperr.h
@@ -10,6 +10,7 @@
#ifndef OPENSSL_HTTPERR_H
# define OPENSSL_HTTPERR_H
+# pragma once
# include <openssl/opensslconf.h>
# include <openssl/symhacks.h>
@@ -37,6 +38,9 @@ int ERR_load_HTTP_strings(void);
# define HTTP_R_ERROR_RECEIVING 103
# define HTTP_R_ERROR_SENDING 102
# define HTTP_R_INCONSISTENT_CONTENT_LENGTH 120
+# define HTTP_R_INVALID_PORT_NUMBER 123
+# define HTTP_R_INVALID_URL_PATH 125
+# define HTTP_R_INVALID_URL_PREFIX 124
# define HTTP_R_MAX_RESP_LEN_EXCEEDED 117
# define HTTP_R_MISSING_ASN1_ENCODING 110
# define HTTP_R_MISSING_CONTENT_TYPE 121