diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-02-19 18:00:26 +0100 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-04-02 18:17:00 +0200 |
commit | afe554c2d244b4e7fc8c1b14acef806a2a581a8d (patch) | |
tree | 0af31aa1a20a0106423ee23522e35504e6013e1a /apps/lib/apps.c | |
parent | 98278b963171ece10a42d18594045b875103115b (diff) |
Chunk 10 of CMP contribution to OpenSSL: CMP http client and related tests
Also improve the generic HTTP client w.r.t. proxy and no_proxy options.
Certificate Management Protocol (CMP, RFC 4210) extension to OpenSSL
Also includes CRMF (RFC 4211) and HTTP transfer (RFC 6712).
Adds the CMP and CRMF API to libcrypto and the "cmp" app to the CLI.
Adds extensive documentation and tests.
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 'apps/lib/apps.c')
-rw-r--r-- | apps/lib/apps.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/lib/apps.c b/apps/lib/apps.c index 7c2a5ea5e7..7b400a413d 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -1990,7 +1990,7 @@ BIO *app_http_tls_cb(BIO *hbio, void *arg, int connect, int detail) } else if (!connect && !detail) { /* disconnecting after error */ const char *hint = tls_error_hint(); if (hint != NULL) - ERR_add_error_data(1, hint); + ERR_add_error_data(2, " : ", hint); /* * If we pop sbio and BIO_free() it this may lead to libssl double free. * Rely on BIO_free_all() done by OSSL_HTTP_transfer() in http_client.c @@ -2000,7 +2000,7 @@ BIO *app_http_tls_cb(BIO *hbio, void *arg, int connect, int detail) } ASN1_VALUE *app_http_get_asn1(const char *url, const char *proxy, - const char *proxy_port, SSL_CTX *ssl_ctx, + const char *no_proxy, SSL_CTX *ssl_ctx, const STACK_OF(CONF_VALUE) *headers, long timeout, const char *expected_content_type, const ASN1_ITEM *it) @@ -2029,7 +2029,7 @@ ASN1_VALUE *app_http_get_asn1(const char *url, const char *proxy, info.use_proxy = proxy != NULL; info.timeout = timeout; info.ssl_ctx = ssl_ctx; - resp = OSSL_HTTP_get_asn1(url, proxy, proxy_port, + resp = OSSL_HTTP_get_asn1(url, proxy, no_proxy, NULL, NULL, app_http_tls_cb, &info, headers, 0 /* maxline */, 0 /* max_resp_len */, timeout, expected_content_type, it); @@ -2042,7 +2042,7 @@ ASN1_VALUE *app_http_get_asn1(const char *url, const char *proxy, ASN1_VALUE *app_http_post_asn1(const char *host, const char *port, const char *path, const char *proxy, - const char *proxy_port, SSL_CTX *ssl_ctx, + const char *no_proxy, SSL_CTX *ssl_ctx, const STACK_OF(CONF_VALUE) *headers, const char *content_type, ASN1_VALUE *req, const ASN1_ITEM *req_it, @@ -2056,7 +2056,7 @@ ASN1_VALUE *app_http_post_asn1(const char *host, const char *port, info.timeout = timeout; info.ssl_ctx = ssl_ctx; return OSSL_HTTP_post_asn1(host, port, path, ssl_ctx != NULL, - proxy, proxy_port, + proxy, no_proxy, NULL, NULL, app_http_tls_cb, &info, headers, content_type, req, req_it, 0 /* maxline */, |