openssl/test/recipes
Dr. David von Oheimb 19f97fe6f1 HTTP: Implement persistent connections (keep-alive)
Both at API and at CLI level (for the CMP app only, so far)
there is a new parameter/option: keep_alive.
* 0 means HTTP connections are not kept open after
receiving a response, which is the default behavior for HTTP 1.0.
* 1 means that persistent connections are requested.
* 2 means that persistent connections are required, i.e.,
in case the server does not grant them an error occurs.

For the CMP app the default value is 1, which means preferring to keep
the connection open. For all other internal uses of the HTTP client
(fetching an OCSP response, a cert, or a CRL) it does not matter
because these operations just take one round trip.

If the client application requested or required a persistent connection
and this was granted by the server, it can keep the OSSL_HTTP_REQ_CTX *
as long as it wants to send further requests and OSSL_HTTP_is_alive()
returns nonzero,
else it should call OSSL_HTTP_REQ_CTX_free() or OSSL_HTTP_close().
In case the client application keeps the OSSL_HTTP_REQ_CTX *
but the connection then dies for any reason at the server side, it will
notice this obtaining an I/O error when trying to send the next request.

This requires extending the HTTP header parsing and
rearranging the high-level HTTP client API. In particular:
* Split the monolithic OSSL_HTTP_transfer() into OSSL_HTTP_open(),
  OSSL_HTTP_set_request(), a lean OSSL_HTTP_transfer(), and OSSL_HTTP_close().
* Split the timeout functionality accordingly and improve default behavior.
* Extract part of OSSL_HTTP_REQ_CTX_new() to OSSL_HTTP_REQ_CTX_set_expected().
* Extend struct ossl_http_req_ctx_st accordingly.

Use the new feature for the CMP client, which requires extending
related transaction management of CMP client and test server.

Update the documentation and extend the tests accordingly.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15053)
2021-05-14 19:24:42 +02:00
..
04-test_conf_data
04-test_params_conversion_data
04-test_pem_read_depr_data Test various deprecated PEM_read_bio_* APIs 2020-11-25 10:02:59 +00:00
04-test_pem_reading_data TEST: Cleanup test recipes 2021-03-27 09:03:55 +01:00
10-test_bn_data
15-test_dsaparam_data dsa_check: Perform simple parameter check if seed is not available 2021-02-18 11:02:26 +01:00
15-test_ecparam_data Check that the ecparam and pkeyparam do not mangle the parameters 2021-01-26 15:26:49 +01:00
15-test_mp_rsa_data
15-test_rsaoaep_data
20-test_dhparam_check_data Fixes related to separation of DH and DHX types 2021-04-26 19:52:11 +02:00
20-test_dhparam_data Add a test for the dhparam CLI application 2020-11-23 09:01:07 +00:00
25-test_eai_data EAI test script and data 2020-08-26 14:04:17 +03:00
25-test_rusext_data Some OIDs used in Russian X.509 certificates. 2020-10-05 12:14:17 +03:00
30-test_evp_data Allow arbitrary digests with ECDSA and DSA 2021-05-12 13:12:00 +02:00
30-test_evp_pkey_provided Update test data for DSA public key text 2020-08-31 14:49:16 +10:00
61-test_bio_prefix_data
65-test_cmp_client_data
65-test_cmp_msg_data Add libctx/provider support to cmp_msg_test 2020-08-21 09:04:13 +02:00
65-test_cmp_protect_data
65-test_cmp_server_data
65-test_cmp_vfy_data
66-test_ossl_store_data Test that OSSL_STORE can load various types of params 2020-11-25 10:02:59 +00:00
80-test_ca_data apps/ca: allow CRL lastUpdate/nextUpdate fields to be specified 2020-09-11 14:32:27 +03:00
80-test_cmp_http_data HTTP: Implement persistent connections (keep-alive) 2021-05-14 19:24:42 +02:00
80-test_cms_data
80-test_ocsp_data
80-test_ssl_old_data Re-enable testing of ciphersuites 2020-11-25 10:14:43 +00:00
80-test_tsa_data TS ESS: Invert the search logic of ts_check_signing_certs() to correctly cover cert ID list 2021-03-18 07:03:52 +01:00
90-test_gost_data
90-test_includes_data Add .includedir pragma 2021-05-05 13:11:35 +02:00
90-test_sslapi_data
90-test_store_data
90-test_threads_data Add a multi-thread test for shared EVP_PKEYs 2021-02-02 12:21:21 +00:00
91-test_pkey_check_data [test][pkey_check] Add more invalid SM2 key tests 2021-01-08 23:59:02 +02:00
95-test_external_gost_engine_data Update copyright year 2021-03-11 13:27:36 +00:00
95-test_external_krb5_data Update copyright year 2021-04-22 14:38:44 +01:00
95-test_external_pyca_data Update copyright year 2021-05-06 13:03:23 +01:00
01-test_abort.t
01-test_fipsmodule_cnf.t Add a new test recipe to verify the generated test fipsmodule.cnf 2021-03-03 14:47:43 +01:00
01-test_sanity.t
01-test_symbol_presence.t Update copyright year 2020-10-15 14:10:06 +01:00
01-test_test.t
02-test_errstr.t Update copyright year 2021-04-08 13:04:41 +01:00
02-test_internal_context.t
02-test_internal_ctype.t
02-test_internal_keymgmt.t Update copyright year 2021-04-08 13:04:41 +01:00
02-test_internal_provider.t
02-test_lhash.t
02-test_ordinals.t
02-test_sparse_array.t
02-test_stack.t
03-test_exdata.t
03-test_fipsinstall.t Add FIPS Self test for AES_ECB decrypt 2021-04-13 13:06:37 +10:00
03-test_internal_asn1_dsa.t
03-test_internal_asn1.t
03-test_internal_bn.t
03-test_internal_chacha.t
03-test_internal_curve448.t
03-test_internal_ec.t
03-test_internal_ffc.t
03-test_internal_mdc2.t
03-test_internal_modes.t
03-test_internal_namemap.t
03-test_internal_poly1305.t
03-test_internal_rsa_sp800_56b.t
03-test_internal_siphash.t
03-test_internal_sm2.t
03-test_internal_sm4.t
03-test_internal_ssl_cert_table.t
03-test_internal_x509.t
03-test_params_api.t
03-test_property.t property: add test case for setting default user properties before fetching 2021-05-12 18:20:03 +10:00
03-test_ui.t
04-test_asn1_decode.t
04-test_asn1_encode.t
04-test_asn1_string_table.t
04-test_bio_callback.t
04-test_bio_core.t Update copyright year 2021-05-06 13:03:23 +01:00
04-test_bioprint.t
04-test_conf.t
04-test_encoder_decoder_legacy.t Don't load the legacy provider in endecoder_legacy_test 2020-12-11 10:56:22 +00:00
04-test_encoder_decoder.t Rename OSSL_SERIALIZER / OSSL_DESERIALIZER to OSSL_ENCODE / OSSL_DECODE 2020-08-21 09:23:58 +02:00
04-test_err.t
04-test_hexstring.t
04-test_param_build.t
04-test_params_conversion.t
04-test_params.t
04-test_pem_read_depr.t Update copyright year 2020-11-26 14:18:57 +00:00
04-test_pem_reading.t Update copyright year 2021-04-08 13:04:41 +01:00
04-test_provider_fallback.t
04-test_provider.t Add a test for OSSL_LIB_CTX_new_child() 2021-05-11 14:59:43 +01:00
05-test_bf.t
05-test_cast.t
05-test_cmac.t
05-test_des.t
05-test_hmac.t
05-test_idea.t
05-test_rand.t rand: instantiate the DRBGs upon first use. 2020-08-28 10:19:56 +10:00
05-test_rc2.t
05-test_rc4.t
05-test_rc5.t
06-test_algorithmid.t Update copyright year 2021-02-18 15:05:17 +00:00
06-test_rdrand_sanity.t Update copyright year 2021-04-08 13:04:41 +01:00
10-test_bn.t
10-test_exp.t
15-test_dh.t
15-test_dsa.t TEST: modify tconversion.pl for forensics 2020-10-16 19:07:20 +02:00
15-test_dsaparam.t Update copyright year 2021-03-11 13:27:36 +00:00
15-test_ec.t Disable the test-ec completely when building with no-ec 2021-01-26 15:26:49 +01:00
15-test_ecdsa.t
15-test_ecparam.t Update copyright year 2021-01-28 13:54:57 +01:00
15-test_gendh.t Update copyright year 2021-05-06 13:03:23 +01:00
15-test_gendhparam.t Fixes related to separation of DH and DHX types 2021-04-26 19:52:11 +02:00
15-test_gendsa.t TEST: Remove the build of fipsmodule.cnf from test recipes 2021-03-03 14:47:43 +01:00
15-test_genec.t Add Explicit EC parameter support to providers. 2020-08-22 14:55:41 +10:00
15-test_genrsa.t TEST: Remove the build of fipsmodule.cnf from test recipes 2021-03-03 14:47:43 +01:00
15-test_mp_rsa.t
15-test_out_option.t
15-test_rsa.t TEST: Fix test/recipes/15-test_rsa.t 2020-12-15 14:27:23 +01:00
15-test_rsaoaep.t Update copyright year 2021-03-11 13:27:36 +00:00
15-test_rsapss.t
20-test_app.t Update copyright year 2021-01-28 13:54:57 +01:00
20-test_cli_fips.t Update copyright year 2021-03-11 13:27:36 +00:00
20-test_dgst.t Update copyright year 2021-05-06 13:03:23 +01:00
20-test_dhparam_check.t Fixes related to separation of DH and DHX types 2021-04-26 19:52:11 +02:00
20-test_dhparam.t Use BIO_f_readbuffer() in the decoder to support stdin. 2021-03-11 07:57:36 +10:00
20-test_enc_more.t Don't load the legacy provider if not available in test_enc_more 2020-12-11 10:56:22 +00:00
20-test_enc.t Skip tests depending on deprecated list -*-commands options 2020-12-15 04:39:58 +01:00
20-test_kdf.t apps: add mac, cipher and digest arguments to the kdf applet. 2021-05-08 22:13:49 +10:00
20-test_mac.t apps/mac: Add digest and cipher command line options 2021-05-08 22:15:56 +10:00
20-test_passwd.t apps/passwd: remove the -crypt option. 2020-11-12 08:35:47 +10:00
20-test_pkeyutl.t Add some tests for -inform/keyform enforcement 2021-05-06 11:43:32 +01:00
20-test_rand_config.t rand: add a test case for configuration based random 2020-09-23 15:28:30 +10:00
25-test_crl.t Update copyright year 2021-05-06 13:03:23 +01:00
25-test_d2i.t
25-test_eai_data.t Update copyright year 2021-04-08 13:04:41 +01:00
25-test_pkcs7.t Update copyright year 2020-11-05 13:37:26 +00:00
25-test_req.t Tests for creating req from PKCS8 keys with extra attrs 2021-05-11 12:12:32 +02:00
25-test_rusext.t
25-test_sid.t Update copyright year 2020-11-05 13:37:26 +00:00
25-test_verify_store.t
25-test_verify.t cleanup where purpose is not needed in 25-test_verify.t 2021-05-05 09:51:39 +02:00
25-test_x509.t Add some tests for -inform/keyform enforcement 2021-05-06 11:43:32 +01:00
30-test_acvp.t acvp: fix the no-acvp_test build 2021-04-30 17:51:44 +10:00
30-test_aesgcm.t
30-test_afalg.t
30-test_defltfips.t Update copyright year 2021-03-11 13:27:36 +00:00
30-test_engine.t
30-test_evp_extra.t Update copyright year 2021-04-08 13:04:41 +01:00
30-test_evp_fetch_prov.t Update copyright year 2021-03-11 13:27:36 +00:00
30-test_evp_kdf.t
30-test_evp_libctx.t Update copyright year 2021-03-11 13:27:36 +00:00
30-test_evp_pkey_dparam.t
30-test_evp_pkey_provided.t
30-test_evp.t test: separate some DES based tests out to permit a no-des build to work 2021-04-23 11:27:58 +02:00
30-test_pbelu.t
30-test_pkey_meth_kdf.t
30-test_pkey_meth.t
30-test_provider_status.t Update copyright year 2021-03-11 13:27:36 +00:00
40-test_rehash.t
60-test_x509_check_cert_pkey.t Update copyright year 2021-04-22 14:38:44 +01:00
60-test_x509_dup_cert.t
60-test_x509_store.t
60-test_x509_time.t
61-test_bio_prefix.t
61-test_bio_readbuffer.t Fix DER reading from stdin for BIO_f_readbuffer 2021-03-22 09:07:36 +10:00
65-test_cmp_asn.t
65-test_cmp_client.t Update copyright year 2021-03-11 13:27:36 +00:00
65-test_cmp_ctx.t
65-test_cmp_hdr.t Update copyright year 2021-04-08 13:04:41 +01:00
65-test_cmp_msg.t Update copyright year 2021-03-11 13:27:36 +00:00
65-test_cmp_protect.t Update copyright year 2021-03-11 13:27:36 +00:00
65-test_cmp_server.t Update copyright year 2021-03-11 13:27:36 +00:00
65-test_cmp_status.t Update copyright year 2021-04-08 13:04:41 +01:00
65-test_cmp_vfy.t Update copyright year 2021-03-11 13:27:36 +00:00
66-test_ossl_store.t Update copyright year 2021-03-11 13:27:36 +00:00
70-test_asyncio.t
70-test_bad_dtls.t
70-test_clienthello.t
70-test_comp.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_key_share.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_packet.t
70-test_recordlen.t
70-test_renegotiation.t Update copyright year 2021-04-08 13:04:41 +01:00
70-test_servername.t
70-test_sslcbcpadding.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_sslcertstatus.t
70-test_sslextension.t test_sslextension: skip tests that cannot work with no-tls1_2 2021-04-22 17:48:07 +02:00
70-test_sslmessages.t
70-test_sslrecords.t adapt tests to SSL_OP_LEGACY_SERVER_CONNECT change 2021-05-05 08:13:51 -07:00
70-test_sslsessiontick.t
70-test_sslsigalgs.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_sslsignature.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_sslskewith0p.t
70-test_sslversions.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_sslvertol.t Update copyright year 2021-04-08 13:04:41 +01:00
70-test_tls13alerts.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_tls13cookie.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_tls13downgrade.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_tls13hrr.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_tls13kexmodes.t Update expected results for tls13kexmodes tests 2021-05-12 09:11:48 -07:00
70-test_tls13messages.t
70-test_tls13psk.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_tlsextms.t Update copyright year 2021-02-18 15:05:17 +00:00
70-test_verify_extra.t
70-test_wpacket.t
71-test_ssl_ctx.t Update copyright year 2021-04-08 13:04:41 +01:00
80-test_ca.t Fix test/recipes/80-test_ca.t to skip_all properly in a subtest 2020-11-07 12:24:49 +01:00
80-test_cipherbytes.t
80-test_cipherlist.t
80-test_ciphername.t
80-test_cmp_http.t 80-test_cmp_http.t: Improve fuzzing exclusion pattern - fixup! 2021-05-11 21:25:10 +02:00
80-test_cms.t ESS: Export three core functions, clean up TS and CMS CAdES-BES usage 2021-04-28 14:10:45 +02:00
80-test_cmsapi.t
80-test_ct.t
80-test_dane.t
80-test_dtls_mtu.t
80-test_dtls.t
80-test_dtlsv1listen.t
80-test_http.t
80-test_ocsp.t
80-test_pkcs12.t Update copyright year 2021-05-06 13:03:23 +01:00
80-test_ssl_new.t Runchecker: fix TLS curves test failure with no-tls1_3 option 2021-04-23 11:13:30 +02:00
80-test_ssl_old.t TEST: Remove the build of fipsmodule.cnf from test recipes 2021-03-03 14:47:43 +01:00
80-test_ssl_test_ctx.t
80-test_sslcorrupt.t
80-test_tsa.t TS ESS: Invert the search logic of ts_check_signing_certs() to correctly cover cert ID list 2021-03-18 07:03:52 +01:00
80-test_x509aux.t Update copyright year 2021-01-28 13:54:57 +01:00
81-test_cmp_cli.t TEST: Remove the build of fipsmodule.cnf from test recipes 2021-03-03 14:47:43 +01:00
90-test_asn1_time.t
90-test_async.t
90-test_bio_enc.t
90-test_bio_memleak.t
90-test_constant_time.t
90-test_fatalerr.t
90-test_fipsload.t Skip test_fipsload when fips is disabled. 2021-04-28 12:06:08 +02:00
90-test_gmdiff.t
90-test_gost.t
90-test_ige.t
90-test_includes.t Add .includedir pragma 2021-05-05 13:11:35 +02:00
90-test_memleak.t
90-test_overhead.t
90-test_secmem.t
90-test_shlibload.t test/recipes/90-test_shlibload.t: Skip when address sanitizer enabled 2020-11-01 06:01:09 +01:00
90-test_srp.t
90-test_sslapi.t Update copyright year 2021-03-11 13:27:36 +00:00
90-test_sslbuffers.t
90-test_store.t Don't use the legacy provider in test_store if its not available 2020-12-11 10:56:34 +00:00
90-test_sysdefault.t
90-test_threads.t test: fix thread test config file problem 2021-05-13 14:22:20 +10:00
90-test_time_offset.t
90-test_tls13ccs.t Update copyright year 2021-02-18 15:05:17 +00:00
90-test_tls13encryption.t TEST: Cleanup test recipes 2021-03-27 09:03:55 +01:00
90-test_tls13secrets.t TEST: Cleanup test recipes 2021-03-27 09:03:55 +01:00
90-test_v3name.t
91-test_pkey_check.t Update copyright year 2021-01-28 13:54:57 +01:00
95-test_external_gost_engine.t Skip GOST engine tests in out of tree builds 2021-04-28 09:38:31 +02:00
95-test_external_krb5.t Update krb5 module to latest release 2021-04-19 11:46:39 -07:00
95-test_external_pyca.t Update copyright year 2021-04-08 13:04:41 +01:00
99-test_ecstress.t
99-test_fuzz_asn1.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_asn1parse.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_bignum.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_bndiv.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_client.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_cmp.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_cms.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_conf.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_crl.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_ct.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_server.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
99-test_fuzz_x509.t [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
fuzz.pl [test/recipes] Split test_fuzz into separate recipes 2020-11-12 16:27:17 +02:00
ocsp-response.der
tconversion.pl Update copyright year 2021-01-28 13:54:57 +01:00