diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2019-10-30 23:39:35 +0100 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-02-10 16:49:37 +0100 |
commit | 29f178bddfdbd11218fbcba0b8060297696968e3 (patch) | |
tree | a44efcd919c122d9c6ff38c61b14676b002aa010 /test/cmp_ctx_test.c | |
parent | bcbb30afe2ef51c7affaaa7ce4db67e26e7ff6b7 (diff) | |
download | openssl-new-29f178bddfdbd11218fbcba0b8060297696968e3.tar.gz |
Generalize the HTTP client so far implemented mostly in crypto/ocsp/ocsp_ht.c
The new client has become an independent libcrpyto module in crypto/http/ and
* can handle any types of requests and responses (ASN.1-encoded and plain)
* does not include potentially busy loops when waiting for responses but
* makes use of a new timeout mechanism integrated with socket-based BIO
* supports the use of HTTP proxies and TLS, including HTTPS over proxies
* supports HTTP redirection via codes 301 and 302 for GET requests
* returns more useful diagnostics in various error situations
Also adapts - and strongly simplifies - hitherto uses of HTTP in crypto/ocsp/,
crypto/x509/x_all.c, apps/lib/apps.c, and apps/{ocsp,s_client,s_server}.c
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/10667)
Diffstat (limited to 'test/cmp_ctx_test.c')
-rw-r--r-- | test/cmp_ctx_test.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/cmp_ctx_test.c b/test/cmp_ctx_test.c index 627df72182..c007cfb35e 100644 --- a/test/cmp_ctx_test.c +++ b/test/cmp_ctx_test.c @@ -301,15 +301,15 @@ static int test_cmp_ctx_log_cb(void) return result; } -static BIO *test_http_cb(OSSL_CMP_CTX *ctx, BIO *hbio, unsigned long detail) +static BIO *test_http_cb(BIO *bio, void *arg, int use_ssl, int detail) { return NULL; } -static int test_transfer_cb(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *req, - OSSL_CMP_MSG **res) +static OSSL_CMP_MSG *test_transfer_cb(OSSL_CMP_CTX *ctx, + const OSSL_CMP_MSG *req) { - return 0; + return NULL; } static int test_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info, @@ -537,6 +537,7 @@ static X509_STORE *X509_STORE_new_1(void) STACK_OF(TYPE)*, NULL, IS_0, \ sk_##TYPE##_new_null(), sk_##TYPE##_free) +typedef OSSL_HTTP_bio_cb_t OSSL_cmp_http_cb_t; #define DEFINE_SET_CB_TEST(FIELD) \ static OSSL_cmp_##FIELD##_t OSSL_CMP_CTX_get_##FIELD(const CMP_CTX *ctx) \ { \ |