aboutsummaryrefslogtreecommitdiff
path: root/include/openssl
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-03-25 13:46:02 +0100
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-04-02 18:31:06 +0200
commit4b1fe471ac99b9f8692be85dcbcbf6977eb35c78 (patch)
tree1589302a8fad703bc2e626a45bddffa5f0d6c4d9 /include/openssl
parentafe554c2d244b4e7fc8c1b14acef806a2a581a8d (diff)
downloadopenssl-4b1fe471ac99b9f8692be85dcbcbf6977eb35c78.zip
openssl-4b1fe471ac99b9f8692be85dcbcbf6977eb35c78.tar.gz
openssl-4b1fe471ac99b9f8692be85dcbcbf6977eb35c78.tar.bz2
HTTP client: make server/proxy and port params more consistent; minor other improvements
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/11404)
Diffstat (limited to 'include/openssl')
-rw-r--r--include/openssl/cmp.h3
-rw-r--r--include/openssl/http.h10
-rw-r--r--include/openssl/httperr.h3
3 files changed, 13 insertions, 3 deletions
diff --git a/include/openssl/cmp.h b/include/openssl/cmp.h
index 536f26b..b594296 100644
--- a/include/openssl/cmp.h
+++ b/include/openssl/cmp.h
@@ -274,9 +274,8 @@ int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
void OSSL_CMP_CTX_print_errors(OSSL_CMP_CTX *ctx);
/* message transfer: */
int OSSL_CMP_CTX_set1_serverPath(OSSL_CMP_CTX *ctx, const char *path);
-int OSSL_CMP_CTX_set1_serverName(OSSL_CMP_CTX *ctx, const char *name);
+int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
-# define OSSL_CMP_DEFAULT_PORT 80
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
diff --git a/include/openssl/http.h b/include/openssl/http.h
index d618e59..4dff008 100644
--- a/include/openssl/http.h
+++ b/include/openssl/http.h
@@ -25,6 +25,16 @@ extern "C" {
typedef BIO *(*OSSL_HTTP_bio_cb_t)(BIO *bio, void *arg, int connect, int detail);
+# define OSSL_HTTP_NAME "http"
+# define OSSL_HTTPS_NAME "https"
+# define OSSL_HTTP_PREFIX OSSL_HTTP_NAME"://"
+# define OSSL_HTTPS_PREFIX OSSL_HTTPS_NAME"://"
+# define OSSL_HTTP_PORT "80"
+# define OSSL_HTTPS_PORT "443"
+# define OPENSSL_NO_PROXY "NO_PROXY"
+# define OPENSSL_HTTP_PROXY "HTTP_PROXY"
+# define OPENSSL_HTTPS_PROXY "HTTPS_PROXY"
+
BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
BIO *bio, BIO *rbio,
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
diff --git a/include/openssl/httperr.h b/include/openssl/httperr.h
index cda4a34..e4acb1d 100644
--- a/include/openssl/httperr.h
+++ b/include/openssl/httperr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* 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
@@ -47,6 +47,7 @@ int ERR_load_HTTP_strings(void);
# define HTTP_R_REDIRECTION_NOT_ENABLED 116
# define HTTP_R_RESPONSE_LINE_TOO_LONG 113
# define HTTP_R_RESPONSE_PARSE_ERROR 104
+# define HTTP_R_SOCK_NOT_SUPPORTED 122
# define HTTP_R_STATUS_CODE_UNSUPPORTED 114
# define HTTP_R_TLS_NOT_ENABLED 107
# define HTTP_R_TOO_MANY_REDIRECTIONS 115