summaryrefslogtreecommitdiffstats
path: root/crypto/http
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-02-11 16:07:00 +0100
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-02-12 12:29:59 +0100
commit100cc8b0a644aab8e50b6ec29d966cc015cd5cf0 (patch)
tree09a4c1a20231337f47469c01e58680ec96b5720c /crypto/http
parent903f582016cdc31b3f3557c168883ccd8a4debf5 (diff)
fix build for new HTTP client in case OPENSSL_NO_CMP or OPENSSL_NO_OCSP
fix also formatting nits w.r.t. #if indentations in ocsp.h 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/11058)
Diffstat (limited to 'crypto/http')
-rw-r--r--crypto/http/http_client.c5
-rw-r--r--crypto/http/http_local.h12
2 files changed, 10 insertions, 7 deletions
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c
index 424b4c3922..2649723c61 100644
--- a/crypto/http/http_client.c
+++ b/crypto/http/http_client.c
@@ -883,8 +883,11 @@ BIO *OSSL_HTTP_transfer(const char *server, const char *port, const char *path,
if (lib == ERR_LIB_SSL || lib == ERR_LIB_HTTP
|| (lib == ERR_LIB_BIO && reason == BIO_R_CONNECT_TIMEOUT)
|| (lib == ERR_LIB_BIO && reason == BIO_R_CONNECT_ERROR)
+# ifndef OPENSSL_NO_CMP
|| (lib == ERR_LIB_CMP
- && reason == CMP_R_POTENTIALLY_INVALID_CERTIFICATE)) {
+ && reason == CMP_R_POTENTIALLY_INVALID_CERTIFICATE)
+# endif
+ ) {
BIO_snprintf(buf, 200, "server=%s:%s", server, port);
ERR_add_error_data(1, buf);
if (err == 0) {
diff --git a/crypto/http/http_local.h b/crypto/http/http_local.h
index 33457f1e09..37eb74a660 100644
--- a/crypto/http/http_local.h
+++ b/crypto/http/http_local.h
@@ -16,12 +16,12 @@
/* name aliases for legacy names with name prefix "OCSP_" */
typedef OCSP_REQ_CTX OSSL_HTTP_REQ_CTX;
/* functions meanwhile only used internally */
-# define OSSL_HTTP_REQ_CTX_new OCSP_REQ_CTX_new
-# define OSSL_HTTP_REQ_CTX_free OCSP_REQ_CTX_free
-# define OSSL_HTTP_REQ_CTX_header OCSP_REQ_CTX_http
-# define OSSL_HTTP_REQ_CTX_add1_header OCSP_REQ_CTX_add1_header
-# define OSSL_HTTP_REQ_CTX_i2d OCSP_REQ_CTX_i2d
-# define OSSL_HTTP_REQ_CTX_nbio OCSP_REQ_CTX_nbio
+# define OSSL_HTTP_REQ_CTX_new OCSP_REQ_CTX_new
+# define OSSL_HTTP_REQ_CTX_free OCSP_REQ_CTX_free
+# define OSSL_HTTP_REQ_CTX_header OCSP_REQ_CTX_http
+# define OSSL_HTTP_REQ_CTX_add1_header OCSP_REQ_CTX_add1_header
+# define OSSL_HTTP_REQ_CTX_i2d OCSP_REQ_CTX_i2d
+# define OSSL_HTTP_REQ_CTX_nbio OCSP_REQ_CTX_nbio
# ifndef OPENSSL_NO_SOCK
# define OSSL_HTTP_REQ_CTX_sendreq_d2i OCSP_REQ_CTX_nbio_d2i
# endif