openssl/test/recipes
slontis 79c98fc6cc Fix EVP_PKEY_print_private() so that it works with non default providers.
At some point in time it was decided that the EC keymanagers ec_export()
function would only allow the selection to be both the public + private
parts. If just the private element is selected it returns an error.
Many openssl commandline apps use EVP_PKEY_print_private() which passes
EVP_PKEY_PRIVATE_KEY to the encoder. This selection propagates to
encoder_construct_pkey(). For external providers (such as the fips
provider this will call the keymanagers export() with the selection set
to just the private part.

So we either need to
1) change the selection in EVP_PKEY_print_private() or
2) modify the selection used in the export used in
   encoder_construct_pkey
3) Change the ec_export to allow this.

I have chosen 2) but I am not sure if this is the correct thing to do
or whether it should conditionally do this when the output_type ==
'text'.

Issue was reported by Ilia Okomin (Oracle).

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26004)
2024-11-29 17:11:23 +01:00
..
04-test_asn1_stable_parse_data
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 Copyright year updates 2024-09-05 09:35:49 +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 Avoid type errors in EAI-related name check logic. 2024-09-03 11:58:40 +02:00
25-test_pkcs7_data
25-test_rusext_data feat: use ossl_serial_number_print in X509_print_ex 2024-09-16 23:40:16 +02:00
30-test_defltfips
30-test_evp_data Use the correct length value for input salt 2024-10-02 12:05:39 +02:00
30-test_evp_pkey_provided
30-test_pairwise_fail_data
61-test_bio_prefix_data
61-test_bio_pw_callback_data Add test for BIO password callback functionality 2024-09-09 08:58:03 +02:00
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
75-test_quicapi_data
80-test_ca_data
80-test_ca_internals_data
80-test_cmp_http_data 80-test_cmp_http.t: fix handling of IPv6 server host (localhost '::1') 2024-09-23 22:15:50 +02:00
80-test_cms_data
80-test_cmsapi_data
80-test_ocsp_data
80-test_pkcs12_data Test PBMAC1 with absent PBKDF2 PRF 2024-10-07 17:51:54 +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
95-test_external_cf_quiche_data
95-test_external_gost_engine_data
95-test_external_krb5_data
95-test_external_oqsprovider_data work around oqsprovider out-of-source build bug 2024-10-23 11:12:33 +11:00
95-test_external_pkcs11_provider_data test: Add external test for pkcs11-provider 2024-10-21 11:43:03 +01:00
95-test_external_pyca_data
95-test_external_tlsfuzzer_data add test coverage for #25298 2024-10-21 11:40:16 +01:00
00-prep_fipsmodule_cnf.t
01-test_abort.t
01-test_fipsmodule_cnf.t
01-test_sanity.t
01-test_symbol_presence.t
01-test_test.t
02-test_errstr.t
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 Copyright year updates 2024-09-05 09:35:49 +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 fips: remove redundant RSA encrypt/decrypt KAT 2024-11-22 14:26:01 +01: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
04-test_asn1_stable_parse.t
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 Copyright year updates 2024-09-05 09:35:49 +02:00
04-test_encoder_decoder_legacy.t
04-test_encoder_decoder.t Fix EVP_PKEY_print_private() so that it works with non default providers. 2024-11-29 17:11:23 +01:00
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
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 Copyright year updates 2024-09-05 09:35:49 +02: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 APPS/dsaparam: fix case where infile and outfile are the same 2024-10-04 12:09:33 +02:00
15-test_ec.t
15-test_ecdsa.t
15-test_ecparam.t APPS/{ecparam,pkeyparam}: fix case where infile and outfile are the same 2024-10-04 12:09:33 +02:00
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
15-test_mp_rsa.t
15-test_out_option.t
15-test_pkey.t add test/recipes/15-test_pkey.t 2024-10-04 12:09:33 +02:00
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 Copyright year updates 2024-09-05 09:35:49 +02:00
20-test_dgst.t Add a test for the nonce-type sigopt 2024-09-09 09:51:50 +02:00
20-test_dhparam_check.t
20-test_dhparam.t APPS/dhparam: fix case where infile and outfile are the same 2024-10-04 12:09:33 +02:00
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 APPS/pkeyutl: add missing high-level check for -verifyrecover being usable only with RSA 2024-11-09 11:43:59 +01:00
20-test_rand_config.t
20-test_speed.t test_speed: Explicitly test the crashing command line on sparc 2024-10-28 15:53:31 -04:00
20-test_spkac.t
25-test_crl.t
25-test_d2i.t
25-test_eai_data.t Copyright year updates 2024-09-05 09:35:49 +02:00
25-test_pkcs7.t
25-test_pkcs8.t APPS/pkcs8: fix case where infile and outfile are the same 2024-10-04 12:09:33 +02:00
25-test_req.t test: Add test cases for req -cipher option 2024-10-30 11:55:23 +00:00
25-test_rusext.t
25-test_sid.t
25-test_verify_store.t
25-test_verify.t
25-test_x509.t test: the attributeDescriptor X.509v3 extension 2024-11-13 11:53:34 +01:00
30-test_acvp.t
30-test_aesgcm.t
30-test_afalg.t
30-test_defltfips.t Copyright year updates 2024-09-05 09:35:49 +02: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 EVP_get_default_properties - tests 2024-09-16 08:15:52 +10:00
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
30-test_evp.t Copyright year updates 2024-09-05 09:35:49 +02:00
30-test_hpke.t
30-test_pairwise_fail.t
30-test_pbelu.t
30-test_pkey_meth_kdf.t
30-test_pkey_meth.t
30-test_prov_config.t Copyright year updates 2024-09-05 09:35:49 +02:00
30-test_provider_status.t Copyright year updates 2024-09-05 09:35:49 +02:00
40-test_rehash.t
60-test_x509_acert.t Copyright year updates 2024-09-05 09:35:49 +02:00
60-test_x509_check_cert_pkey.t
60-test_x509_dup_cert.t
60-test_x509_load_cert_file.t
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
61-test_bio_prefix.t
61-test_bio_pw_callback.t Add test for BIO password callback functionality 2024-09-09 08:58:03 +02:00
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
70-test_quic_multistream.t
70-test_quic_qlog.t
70-test_quic_rcidm.t
70-test_quic_record.t
70-test_quic_srtm.t
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 Copyright year updates 2024-09-05 09:35:49 +02:00
70-test_servername.t
70-test_sslcbcpadding.t
70-test_sslcertstatus.t
70-test_sslextension.t Copyright year updates 2024-09-05 09:35:49 +02:00
70-test_sslkeylogfile.t updating comments in test recipie 2024-10-21 11:34:35 +01:00
70-test_sslmessages.t Copyright year updates 2024-09-05 09:35:49 +02:00
70-test_sslrecords.t
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
70-test_tls13certcomp.t Copyright year updates 2024-09-05 09:35:49 +02: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 Copyright year updates 2024-09-05 09:35:49 +02:00
70-test_tls13messages.t Copyright year updates 2024-09-05 09:35:49 +02: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
75-test_quic_ackm.t
75-test_quic_cc.t
75-test_quic_srt_gen.t
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_cmp_http.t: fix handling of IPv6 server host (localhost '::1') 2024-09-23 22:15:50 +02:00
80-test_cms.t fips: Prohibit SHA1 in DH & ECDH exchange 2024-09-27 09:13:05 +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_ocsp.t APPS/ocsp: fix case where reqin and outfile are the same 2024-10-04 12:09:33 +02:00
80-test_pkcs12.t Test PBMAC1 with absent PBKDF2 PRF 2024-10-07 17:51:54 +02:00
80-test_policy_tree.t
80-test_ssl_new.t Copyright year updates 2024-09-05 09:35:49 +02:00
80-test_ssl_old.t Copyright year updates 2024-09-05 09:35:49 +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_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
90-test_srp.t
90-test_sslapi.t Copyright year updates 2024-09-05 09:35:49 +02:00
90-test_sslbuffers.t
90-test_store_cases.t
90-test_store.t APPS/storeutl: fix case where uri and outfile are the same 2024-10-09 11:10:19 +02:00
90-test_sysdefault.t Copyright year updates 2024-09-05 09:35:49 +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
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_pkcs11_provider.t test: Add external test for pkcs11-provider 2024-10-21 11:43:03 +01:00
95-test_external_pyca.t
95-test_external_tlsfuzzer.t
99-test_ecstress.t
99-test_fuzz_acert.t Copyright year updates 2024-09-05 09:35:49 +02: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
99-test_fuzz_dtlsserver.t
99-test_fuzz_hashtable.t Copyright year updates 2024-09-05 09:35:49 +02:00
99-test_fuzz_pem.t
99-test_fuzz_provider.t Copyright year updates 2024-09-05 09:35:49 +02:00
99-test_fuzz_punycode.t
99-test_fuzz_quic_client.t
99-test_fuzz_quic_lcidm.t
99-test_fuzz_quic_rcidm.t
99-test_fuzz_quic_srtm.t
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 test/recipes/tconversion.pl: add sub test_file_contains 2024-10-09 11:10:04 +02:00