openssl/test/recipes
Viktor Dukhovni 0cd9dd703e Improve base64 BIO correctness and error reporting
Also improve related documentation.

- The BIO_FLAGS_BASE64_NO_NL flag did not behave as advertised, only
  leading and trailing, but not internal, whitespace was supported:

      $ echo 'AA AA' | openssl base64 -A -d | wc -c
      0

- Switching from ignored leading input to valid base64 input misbehaved
  when the length of the skipped input was one more than the length of
  the second and subsequent valid base64 lines in the internal 1k
  buffer:

    $ printf '#foo\n#bar\nA\nAAA\nAAAA\n' | openssl base64 -d | wc -c
    0

- When the underlying BIO is retriable, and a read returns less than
  1k of data, some of the already buffered input lines that could have
  been decoded and returned were retained internally for a retry by the
  caller.  This is somewhat surprising, and the new code decodes as many
  of the buffered lines as possible.  Issue reported by Michał Trojnara.

- After all valid data has been read, the next BIO_read(3) should
  return 0 when the input was all valid or -1 if an error was detected.
  This now occurs in more consistently, but further tests and code
  refactoring may be needed to ensure this always happens.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25253)
2024-08-30 15:09:10 +02:00
..
04-test_asn1_stable_parse_data Fix NULL pointer deref when parsing the stable section 2024-01-12 10:37:22 +01:00
04-test_conf_data Add tests for long configuration lines with backslashes 2024-07-16 21:32:40 +02:00
04-test_params_conversion_data
04-test_pem_read_depr_data
04-test_pem_reading_data
10-test_bn_data Additional testcases for bn_gcd 2024-05-15 13:38:24 +02:00
15-test_dsaparam_data Check DSA parameters for excessive sizes before validating 2024-05-16 15:44:40 +02:00
15-test_ecparam_data
15-test_mp_rsa_data
15-test_rsaoaep_data
15-test_rsapss_data
20-test_dhparam_check_data
20-test_dhparam_data
25-test_eai_data Remove duplicate colon in otherName display 2024-08-07 19:53:49 +02:00
25-test_pkcs7_data
25-test_rusext_data
30-test_defltfips
30-test_evp_data Refactor OpenSSL 'ECDSA' EVP_SIGNATURE to also include ECDSA+hash composites 2024-08-30 11:54:13 +02:00
30-test_evp_pkey_provided
30-test_pairwise_fail_data
61-test_bio_prefix_data
65-test_cmp_client_data
65-test_cmp_msg_data
65-test_cmp_protect_data
65-test_cmp_server_data
65-test_cmp_vfy_data
66-test_ossl_store_data
70-test_quic_multistream_data Dump out qlog json if it is malformed 2024-03-02 09:12:54 -05:00
75-test_quicapi_data
80-test_ca_data
80-test_ca_internals_data
80-test_cmp_http_data Fix typos found by codespell 2024-08-07 19:09:43 +02:00
80-test_cms_data
80-test_cmsapi_data
80-test_ocsp_data
80-test_pkcs12_data Test vectors from rfc9579 and creation tests 2024-08-07 10:00:16 +02:00
80-test_policy_tree_data
80-test_ssl_old_data
80-test_tsa_data
90-test_gost_data
90-test_includes_data
90-test_sslapi_data
90-test_store_cases_data
90-test_store_data
90-test_sysdefault_data Add tests for conf_diagnostics 2024-05-09 09:20:58 +02:00
90-test_threads_data
91-test_pkey_check_data Limit the execution time of RSA public key check 2024-01-15 10:54:34 +01:00
95-test_external_cf_quiche_data
95-test_external_gost_engine_data Copyright year updates 2024-04-09 13:43:26 +02:00
95-test_external_krb5_data
95-test_external_oqsprovider_data updated to oqs-provider 0.6.0 2024-04-29 10:29:22 +02:00
95-test_external_pyca_data
95-test_external_tlsfuzzer_data Copyright year updates 2024-04-09 13:43:26 +02:00
00-prep_fipsmodule_cnf.t
01-test_abort.t
01-test_fipsmodule_cnf.t
01-test_sanity.t
01-test_symbol_presence.t test/recipes/01-test_symbol_presence.t: Treat common symbols specially 2023-12-04 09:55:15 +01:00
01-test_test.t
02-test_errstr.t Copyright year updates 2024-04-09 13:43:26 +02:00
02-test_internal_context.t
02-test_internal_ctype.t
02-test_internal_exts.t
02-test_internal_keymgmt.t
02-test_internal_provider.t
02-test_lhash.t
02-test_list.t
02-test_localetest.t
02-test_ordinals.t
02-test_priority_queue.t
02-test_sparse_array.t
02-test_stack.t
02-test_strtoul.t Add a stroul test 2024-07-18 19:07:52 +02:00
02-test_time.t
02-test_windows_registry.t Update defaults to install keys against major.minor 2024-07-09 04:01:44 -04:00
03-test_exdata.t
03-test_fipsinstall.t Cleanups for FIPS options.. 2024-08-28 14:46:16 +02: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_sm3.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
03-test_ui.t
04-test_asn1_decode.t
04-test_asn1_encode.t
04-test_asn1_parse.t Harden asn1 oid loader to invalid inputs 2023-12-13 11:10:36 -05:00
04-test_asn1_stable_parse.t Copyright year updates 2024-04-09 13:43:26 +02:00
04-test_asn1_string_table.t
04-test_bio_callback.t
04-test_bio_core.t
04-test_bio_dgram.t
04-test_bio_tfo.t
04-test_bioprint.t
04-test_conf.t Add tests for long configuration lines with backslashes 2024-07-16 21:32:40 +02:00
04-test_encoder_decoder_legacy.t
04-test_encoder_decoder.t
04-test_err.t
04-test_hexstring.t
04-test_membio.t
04-test_nodefltctx.t
04-test_param_build.t
04-test_params_conversion.t
04-test_params.t
04-test_pem_read_depr.t
04-test_pem_reading.t
04-test_provfetch.t
04-test_provider_default_search_path.t
04-test_provider_fallback.t
04-test_provider_pkey.t
04-test_provider.t Add a minimal test provider 2023-12-04 15:12:34 +01:00
04-test_punycode.t
04-test_upcalls.t
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_pbe.t
05-test_rand.t Add unit tests for the TEST-RAND FIPS indicator 2024-07-17 10:43:21 +10:00
05-test_rc2.t
05-test_rc4.t
05-test_rc5.t
06-test_algorithmid.t
06-test_rdcpu_sanity.t
07-test_bio_comp.t
10-test_bn.t
10-test_exp.t
15-test_dh.t
15-test_dsa.t
15-test_dsaparam.t
15-test_ec.t
15-test_ecdsa.t
15-test_ecparam.t
15-test_gendh.t
15-test_gendhparam.t
15-test_gendsa.t Add FIPS DSA Keygen tests 2024-08-06 11:01:13 +02:00
15-test_genec.t
15-test_genpkey.t
15-test_genrsa.t
15-test_gensm2.t Copyright year updates 2024-04-09 13:43:26 +02:00
15-test_mp_rsa.t
15-test_out_option.t
15-test_rsa.t
15-test_rsaoaep.t
15-test_rsapss.t
15-test_rsax931.t
15-test_sha.t
20-test_app.t
20-test_cli_fips.t adds TLS signature algorithms list feature 2024-08-13 11:48:54 +10:00
20-test_dgst.t Intentionally break EVP_DigestFinal for SHAKE128 and SHAKE256 2024-05-15 12:10:32 +02:00
20-test_dhparam_check.t
20-test_dhparam.t
20-test_enc_more.t
20-test_enc.t
20-test_kdf.t
20-test_legacy_okay.t
20-test_mac.t
20-test_passwd.t
20-test_pkeyutl.t Encap/decap in pkeyutl - tests 2024-08-13 11:03:11 +02:00
20-test_rand_config.t
20-test_speed.t Don't compile in support for DSA speed testing if not needed 2024-08-14 18:22:10 +02:00
20-test_spkac.t
25-test_crl.t
25-test_d2i.t
25-test_eai_data.t
25-test_pkcs7.t
25-test_pkcs8.t
25-test_req.t extend X509_REQ_add_extensions_nid() and thuis APPS/req to support augmenting/overriding existing extensions 2024-07-10 16:19:26 +02:00
25-test_rusext.t
25-test_sid.t
25-test_verify_store.t
25-test_verify.t
25-test_x509.t test: issuedOnBehalfOf X.509v3 extension 2024-08-27 16:48:57 +02:00
30-test_acvp.t
30-test_aesgcm.t
30-test_afalg.t
30-test_defltfips.t Add "no-fips-post" configure option. 2024-08-09 09:12:45 +10:00
30-test_engine.t
30-test_evp_byname.t evp_get_digest/cipherbyname_ex(): Try to fetch if not found 2024-07-31 11:25:55 +02:00
30-test_evp_extra.t
30-test_evp_fetch_prov.t
30-test_evp_kdf.t
30-test_evp_libctx.t
30-test_evp_pkey_dhkem.t
30-test_evp_pkey_dparam.t
30-test_evp_pkey_provided.t
30-test_evp_xof.t Add EVP_DigestSqueeze() API. 2023-11-10 13:27:00 +01:00
30-test_evp.t Refactor OpenSSL 'ECDSA' EVP_SIGNATURE to also include ECDSA+hash composites 2024-08-30 11:54:13 +02:00
30-test_hpke.t
30-test_pairwise_fail.t Copyright year updates 2024-04-09 13:43:26 +02:00
30-test_pbelu.t
30-test_pkey_meth_kdf.t
30-test_pkey_meth.t
30-test_prov_config.t Add test for OSSL_PROVIDER_load with module path set 2024-04-18 18:38:39 +02:00
30-test_provider_status.t Add "no-fips-post" configure option. 2024-08-09 09:12:45 +10:00
40-test_rehash.t
60-test_x509_acert.t x509_acert: Add more parsing and printing tests 2024-04-24 14:08:05 +01:00
60-test_x509_check_cert_pkey.t
60-test_x509_dup_cert.t
60-test_x509_load_cert_file.t Fix a memory leak on successful load of CRL 2024-03-07 11:03:31 +01:00
60-test_x509_req.t Make x509_req_test ANSI Compatible 2024-06-21 15:40:45 -04:00
60-test_x509_store.t
60-test_x509_time.t
61-test_bio_addr.t
61-test_bio_meth.t Fix BIO_get_new_index() to return an error when it is exhausted. 2024-03-11 11:34:25 +00:00
61-test_bio_prefix.t
61-test_bio_readbuffer.t
65-test_cmp_asn.t
65-test_cmp_client.t
65-test_cmp_ctx.t
65-test_cmp_hdr.t
65-test_cmp_msg.t
65-test_cmp_protect.t
65-test_cmp_server.t
65-test_cmp_status.t
65-test_cmp_vfy.t
66-test_ossl_store.t
70-test_asyncio.t
70-test_bad_dtls.t
70-test_certtypeext.t
70-test_clienthello.t
70-test_comp.t Refactor and Enhance Compression Field Testing 2024-08-29 19:16:38 +02:00
70-test_key_share.t
70-test_npn.t Add a test for an empty NextProto message 2024-06-27 10:30:52 +01:00
70-test_packet.t
70-test_quic_cfq.t
70-test_quic_fc.t
70-test_quic_fifd.t
70-test_quic_lcidm.t QUIC LCIDM: Add test 2023-12-06 10:40:11 +00:00
70-test_quic_multistream.t Copyright year updates 2024-04-09 13:43:26 +02:00
70-test_quic_qlog.t Copyright year updates 2024-04-09 13:43:26 +02:00
70-test_quic_rcidm.t Copyright year updates 2024-04-09 13:43:26 +02:00
70-test_quic_record.t
70-test_quic_srtm.t QUIC SRTM: Add test 2023-11-23 14:46:01 +00:00
70-test_quic_stream.t
70-test_quic_tserver.t
70-test_quic_txp.t
70-test_quic_txpim.t
70-test_quic_wire.t
70-test_recordlen.t
70-test_renegotiation.t Use empty renegotiate extension instead of SCSV for TLS > 1.0 2024-04-22 13:23:28 +01:00
70-test_servername.t
70-test_sslcbcpadding.t Copyright year updates 2024-04-09 13:43:26 +02:00
70-test_sslcertstatus.t
70-test_sslextension.t Use empty renegotiate extension instead of SCSV for TLS > 1.0 2024-04-22 13:23:28 +01:00
70-test_sslmessages.t Use empty renegotiate extension instead of SCSV for TLS > 1.0 2024-04-22 13:23:28 +01:00
70-test_sslrecords.t Copyright year updates 2024-04-09 13:43:26 +02:00
70-test_sslsessiontick.t
70-test_sslsigalgs.t
70-test_sslsignature.t
70-test_sslskewith0p.t
70-test_sslversions.t
70-test_sslvertol.t
70-test_tls13alerts.t Fix new typos found by codespell 2023-12-29 10:12:05 +01:00
70-test_tls13certcomp.t Use empty renegotiate extension instead of SCSV for TLS > 1.0 2024-04-22 13:23:28 +01:00
70-test_tls13cookie.t
70-test_tls13downgrade.t
70-test_tls13hrr.t Add a test for a missing supported_versions extension in the HRR 2024-08-07 19:34:23 +02:00
70-test_tls13kexmodes.t Use empty renegotiate extension instead of SCSV for TLS > 1.0 2024-04-22 13:23:28 +01:00
70-test_tls13messages.t Use empty renegotiate extension instead of SCSV for TLS > 1.0 2024-04-22 13:23:28 +01:00
70-test_tls13psk.t
70-test_tlsextms.t
70-test_verify_extra.t
70-test_wpacket.t
71-test_ssl_ctx.t
75-test_json_enc.t Copyright year updates 2024-04-09 13:43:26 +02:00
75-test_quic_ackm.t
75-test_quic_cc.t
75-test_quic_srt_gen.t QUIC SRT GEN: Add SRT generator 2023-11-25 09:14:05 +00:00
75-test_quicapi.t
79-test_http.t
80-test_ca_internals.t
80-test_ca.t
80-test_cipherbytes.t
80-test_cipherlist.t
80-test_ciphername.t
80-test_cmp_http.t
80-test_cms.t Restrict salt length for RSA-PSS in the FIPS provider 2024-08-13 09:55:36 +10: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_ocsp.t
80-test_pkcs12.t Fix PBMAC1 MAC verification in FIPS mode 2024-08-11 10:11:33 +02:00
80-test_policy_tree.t
80-test_ssl_new.t Disable DSA signing in the FIPS provider. 2024-07-26 09:24:04 +10:00
80-test_ssl_old.t Cleanups for FIPS options.. 2024-08-28 14:46:16 +02:00
80-test_ssl_test_ctx.t
80-test_sslcorrupt.t
80-test_tsa.t
80-test_x509aux.t
81-test_cmp_cli.t
82-test_ocsp_cert_chain.t 82-test_ocsp_cert_chain.t: kill -HUP the server after client quits 2024-04-29 10:25:39 +02:00
82-test_tfo_cli.t
90-test_asn1_time.t
90-test_async.t
90-test_bio_base64.t Improve base64 BIO correctness and error reporting 2024-08-30 15:09:10 +02:00
90-test_bio_enc.t
90-test_bio_memleak.t
90-test_cert_comp.t
90-test_constant_time.t
90-test_fatalerr.t
90-test_fipsload.t
90-test_gmdiff.t
90-test_ige.t
90-test_includes.t
90-test_memleak.t
90-test_overhead.t
90-test_quicfaults.t
90-test_rpk.t
90-test_secmem.t
90-test_shlibload.t Copyright year updates 2024-04-09 13:43:26 +02:00
90-test_srp.t
90-test_sslapi.t Cleanups for FIPS options.. 2024-08-28 14:46:16 +02:00
90-test_sslbuffers.t
90-test_store_cases.t
90-test_store.t
90-test_sysdefault.t Suppress a spurious error from the sysdefault test 2024-05-15 12:14:24 +02:00
90-test_threads.t
90-test_time_offset.t
90-test_tls13ccs.t
90-test_tls13encryption.t
90-test_tls13secrets.t
90-test_trace_api.t
90-test_v3name.t
91-test_pkey_check.t Copyright year updates 2024-04-09 13:43:26 +02:00
95-test_external_cf_quiche.t
95-test_external_gost_engine.t
95-test_external_krb5.t
95-test_external_oqsprovider.t
95-test_external_pyca.t
95-test_external_tlsfuzzer.t
99-test_ecstress.t
99-test_fuzz_acert.t fuzz: Add attribute certificate fuzz test 2024-04-24 14:08:03 +01:00
99-test_fuzz_asn1.t
99-test_fuzz_asn1parse.t
99-test_fuzz_bignum.t
99-test_fuzz_bndiv.t
99-test_fuzz_client.t
99-test_fuzz_cmp.t
99-test_fuzz_cms.t
99-test_fuzz_conf.t
99-test_fuzz_crl.t
99-test_fuzz_ct.t
99-test_fuzz_decoder.t
99-test_fuzz_dtlsclient.t Add fuzzing for DTLS 2024-03-12 20:10:40 +01:00
99-test_fuzz_dtlsserver.t Add fuzzing for DTLS 2024-03-12 20:10:40 +01:00
99-test_fuzz_hashtable.t Adding hashtable fuzzer 2024-04-24 12:03:30 +10:00
99-test_fuzz_pem.t
99-test_fuzz_provider.t Add provider fuzzer 2024-05-24 11:56:41 +02:00
99-test_fuzz_punycode.t
99-test_fuzz_quic_client.t
99-test_fuzz_quic_lcidm.t QUIC LCIDM: Add fuzzer 2023-12-06 10:40:11 +00:00
99-test_fuzz_quic_rcidm.t Copyright year updates 2024-04-09 13:43:26 +02:00
99-test_fuzz_quic_srtm.t QUIC SRTM: Add fuzzer for SRTM 2023-11-23 14:46:01 +00:00
99-test_fuzz_server.t
99-test_fuzz_smime.t
99-test_fuzz_v3name.t
99-test_fuzz_x509.t
fuzz.pl
ocsp-response.der
tconversion.pl apps: ca,req,x509: Add explicit start and end dates options 2024-04-09 20:13:31 +02:00