diff options
author | Richard Levitte <levitte@openssl.org> | 2020-11-04 12:23:19 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-13 09:35:02 +0100 |
commit | 9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (patch) | |
tree | e82c26569e5a952980e65a746af920beed602aab /crypto/http/http_lib.c | |
parent | 31a6b52f6db009c639c67387a707dd235f29a430 (diff) |
Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call
This includes error reporting for libcrypto sub-libraries in surprising
places.
This was done using util/err-to-raise
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13318)
Diffstat (limited to 'crypto/http/http_lib.c')
-rw-r--r-- | crypto/http/http_lib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/http/http_lib.c b/crypto/http/http_lib.c index be790bda90..028ef12383 100644 --- a/crypto/http/http_lib.c +++ b/crypto/http/http_lib.c @@ -38,7 +38,7 @@ int OSSL_HTTP_parse_url(const char *url, char **phost, char **pport, *pssl = 0; if (url == NULL) { - HTTPerr(0, ERR_R_PASSED_NULL_PARAMETER); + ERR_raise(ERR_LIB_HTTP, ERR_R_PASSED_NULL_PARAMETER); return 0; } @@ -58,7 +58,7 @@ int OSSL_HTTP_parse_url(const char *url, char **phost, char **pport, port = OSSL_HTTPS_PORT; portnum = 443; } else if (strcmp(buf, OSSL_HTTP_NAME) != 0) { - HTTPerr(0, HTTP_R_INVALID_URL_PREFIX); + ERR_raise(ERR_LIB_HTTP, HTTP_R_INVALID_URL_PREFIX); goto err; } p += 3; @@ -95,7 +95,7 @@ int OSSL_HTTP_parse_url(const char *url, char **phost, char **pport, if (p == port || (*p != '\0' && *p != '/')) goto parse_err; if (portnum <= 0 || portnum >= 65536) { - HTTPerr(0, HTTP_R_INVALID_PORT_NUMBER); + ERR_raise(ERR_LIB_HTTP, HTTP_R_INVALID_PORT_NUMBER); goto err; } } @@ -109,7 +109,7 @@ int OSSL_HTTP_parse_url(const char *url, char **phost, char **pport, if (*path == '\0') { path = "/"; } else if (*path != '/') { - HTTPerr(0, HTTP_R_INVALID_URL_PATH); + ERR_raise(ERR_LIB_HTTP, HTTP_R_INVALID_URL_PATH); goto parse_err; } @@ -126,7 +126,7 @@ int OSSL_HTTP_parse_url(const char *url, char **phost, char **pport, return 1; parse_err: - HTTPerr(0, HTTP_R_ERROR_PARSING_URL); + ERR_raise(ERR_LIB_HTTP, HTTP_R_ERROR_PARSING_URL); err: if (ppath != NULL) { |