summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2024-03-07Try to fix intermittent CI failures in sslapitestBernd Edlinger
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23774)
2024-03-07Dont run the self-hosted workflows when not availableBernd Edlinger
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23678) (cherry picked from commit 74fd6823884e27c18ec3fe7bd99b9bc02e6f31f3)
2024-03-01Fix off by one issue in buf2hexstr_sep()shridhar kalavagunta
Fixes #23363 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23404) (cherry picked from commit c5cc9c419a0a8d97a44f01f95f0e213f56da4574)
2024-02-25Ensure `$(MAKE)` commands and `CFLAGS` are appropriately quoted in the Makefile.Hamilton Chapman
If a user's `make` command came from a path that contained a space then both the `$(MAKE)` variable (and parts of the generated `CFLAGS`, when building for iOS) would not be properly quoted and the build would fail. Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23663) (cherry picked from commit aba621934696ca52193bd41cd35816649b6b321b)
2024-02-22SSL_set1_groups_list(): Fix memory corruption with 40 groups and moreMichael Baentsch
Fixes #23624 The calculation of the size for gid_arr reallocation was wrong. A multiplication by gid_arr array item size was missing. Testcase is added. Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23659)
2024-02-22chachap10-ppc.pl: Fix truncated relocation响马
Fix error: relocation truncated to fit: R_PPC64_REL14 (stub) against symbol `ChaCha20_ctr32_vsx_8x' CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23618) (cherry picked from commit 1afb326da4b3a781dc0d7cd91262d81126783b07)
2024-02-22s_cb.c: Add missing return value checksMrRurikov
Return value of function 'SSL_CTX_ctrl', that is called from SSL_CTX_set1_verify_cert_store() and SSL_CTX_set1_chain_cert_store(), is not checked, but it is usually checked for this function. CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23647) (cherry picked from commit 6f794b461c6e16c8afb996ee190e084cbbddb6b8)
2024-02-22Minor wording fixes related to no-atexitTomas Mraz
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/23642) (cherry picked from commit 66e6f72c3e4221580a7f456ddeaa5027f0bbb8b7)
2024-02-22Add atexit configuration option to using atexit() in libcrypto at build-time.Randall S. Becker
This fixes an issue with a mix of atexit() usage in DLL and statically linked libcrypto that came out in the test suite on NonStop, which has slightly different DLL unload processing semantics compared to Linux. The change allows a build configuration to select whether to register OPENSSL_cleanup() with atexit() or not, so avoid situations where atexit() registration causes SIGSEGV. INSTALL.md and CHANGES.md have been modified to include and describe this option. Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca> Signed-off-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23642) (cherry picked from commit 0e1989d4c7435809b60f614c23ba8c9a7c0373e8)
2024-02-21Don't print excessively long ASN1 items in fuzzerMatt Caswell
Prevent spurious fuzzer timeouts by not printing ASN1 which is excessively long. This fixes a false positive encountered by OSS-Fuzz. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23640) (cherry picked from commit 4a6f70c03182b421d326831532edca32bcdb3fb1)
2024-02-20Correct the defined name of the parameter "micalg" in the documentationBernd Ritter
The EVP_DigestInit(3) manual page contains wrong name for the define macro for the OSSL_DIGEST_PARAM_MICALG param. Fixes #23580 CLA: trivial Reviewed-by: Paul Yang <kaishen.yy@antfin.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23615) (cherry picked from commit 5e5c256bbad572cf8d8d9ef9127722ca028d2704)
2024-02-16Fixed Visual Studio 2008 compiler errorsMarcel Gosmann
CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23586) (cherry picked from commit c3e8d67885c0c4295cfd1df35a41bf1f3fa9dc37)
2024-02-16Check for NULL cleanup function before using it in encoder_processNeil Horman
encoder_process assumes a cleanup function has been set in the currently in-use encoder during processing, which can lead to segfaults if said function hasn't been set Add a NULL check for this condition, returning -1 if it is not set Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23069) (cherry picked from commit cf57c3ecfa416afbc47d36633981034809ee6792)
2024-02-14KDF_CTX_new API has incorrect signature (const should not be there)Shakti Shah
https://www.openssl.org/docs/man3.1/man3/EVP_KDF_CTX.html The pages for 3.0/3.1/master seem to have the following EVP_KDF_CTX *EVP_KDF_CTX_new(const EVP_KDF *kdf); which does not match with the actual header which is EVP_KDF_CTX *EVP_KDF_CTX_new(EVP_KDF *kdf); Fixes #23532 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23541) (cherry picked from commit 4f6133f9db2b9b7ce5e59d8b8ec38202a154c524)
2024-02-11Fix typos found by codespell in openssl-3.1Dimitri Papadopoulos
Only modify doc/man* in the openssl-3.1 branch. Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23544)
2024-02-09Fix memory leaks on error cases during drbg initializationsTomas Mraz
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23503) (cherry picked from commit cb4f7a6ee053e8c51cf3ac35fee333d1f25552c0)
2024-02-09Rearrange terms in gf_mul to prevent segfaultAngel Baez
CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23512) (cherry picked from commit 76cecff5e9bedb2bafc60062283f99722697082a)
2024-02-07Fix testcases to run on duplicated keysTomas Mraz
The existing loop pattern did not really run the expected tests on the duplicated keys. Fixes #23129 Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23292) (cherry picked from commit 387b93e14907cd8203d6f2c9d78e49df01cb6e1f)
2024-02-02Fix a few incorrect paths in some build.info filesRichard Levitte
The following files referred to ../liblegacy.a when they should have referred to ../../liblegacy.a. This cause the creation of a mysterious directory 'crypto/providers', and because of an increased strictness with regards to where directories are created, configuration failure on some platforms. Fixes #23436 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23452) (cherry picked from commit 667b45454a47959ce2934b74c899662e686993de)
2024-02-01Sync pyca workflow with masterBernd Edlinger
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/23444)
2024-01-31Document the implications of setting engine-based low-level methodsTomas Mraz
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23063) (cherry picked from commit dbb478a51d3f695ec713e9829a2353a0d2d61a59)
2024-01-31Revert "Improved detection of engine-provided private "classic" keys"Tomas Mraz
This reverts commit 2b74e75331a27fc89cad9c8ea6a26c70019300b5. The commit was wrong. With 3.x versions the engines must be themselves responsible for creating their EVP_PKEYs in a way that they are treated as legacy - either by using the respective set1 calls or by setting non-default EVP_PKEY_METHOD. The workaround has caused more problems than it solved. Fixes #22945 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23063) (cherry picked from commit 39ea78379826fa98e8dc8c0d2b07e2c17cd68380)
2024-01-31Fix error reporting in EVP_PKEY_{sign,verify,verify_recover}Richard Levitte
For some reason, those functions (and the _init functions too) would raise EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE when the passed ctx is NULL, and then not check if the provider supplied the function that would support these libcrypto functions. This corrects the situation, and has all those libcrypto functions raise ERR_R_PASS_NULL_PARAMETER if ctx is NULL, and then check for the corresponding provider supplied, and only when that one is missing, raise EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE. Because 0 doesn't mean error for EVP_PKEY_verify(), -1 is returned when ERR_R_PASSED_NULL_PARAMETER is raised. This is done consistently for all affected functions. Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23411) (cherry picked from commit 5a25177d1b07ef6e754fec1747b57ee90ab1e028)
2024-01-31Fix a possible memleak in bind_afalgBernd Edlinger
bind_afalg calls afalg_aes_cbc which allocates cipher_handle->_hidden global object(s) but if one of them fails due to out of memory, the function bind_afalg relies on the engine destroy method to be called. But that does not happen because the dynamic engine object is not destroyed in the usual way in dynamic_load in this case: If the bind_engine function fails, there will be no further calls into the shared object. See ./crypto/engine/eng_dyn.c near the comment: /* Copy the original ENGINE structure back */ Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23409) (cherry picked from commit 729a1496cc4cda669dea6501c991113c78f04560)
2024-01-30fix missing null check in kdf_test_ctrlNeil Horman
Coverity issue 1453632 noted a missing null check in kdf_test_ctrl recently. If a malformed value is passed in from the test file that does not contain a ':' character, the p variable will be NULL, leading to a NULL derefence prepare_from_text Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23398) (cherry picked from commit 6ca1d3ee81b61bc973e4e1079ec68ac73331c159)
2024-01-30Prepare for 3.1.6Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2024-01-30Prepare for release of 3.1.5openssl-3.1.5Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2024-01-30make updateMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2024-01-30Copyright year updatesMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2024-01-30Update CHANGES.md and NEWS.md for new releaseMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Release: yes (Merged from https://github.com/openssl/openssl/pull/23423)
2024-01-25Have OSSL_PARAM_allocate_from_text() fail on odd number of hex digitsRichard Levitte
The failure would be caught later on, so this went unnoticed, until someone tried with just one hex digit, which was simply ignored. Fixes #23373 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23374) (cherry picked from commit ea6268cfceaba24328d66bd14bfc97c4fac14a58)
2024-01-25Add some tests for various PKCS12 files with NULL ContentInfoMatt Caswell
PKCS7 ContentInfo fields held within a PKCS12 file can be NULL, even if the type has been set to a valid value. CVE-2024-0727 is a result of OpenSSL attempting to dereference the NULL pointer as a result of this. We add test for various instances of this problem. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23362)
2024-01-25Add NULL checks where ContentInfo data can be NULLMatt Caswell
PKCS12 structures contain PKCS7 ContentInfo fields. These fields are optional and can be NULL even if the "type" is a valid value. OpenSSL was not properly accounting for this and a NULL dereference can occur causing a crash. CVE-2024-0727 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23362)
2024-01-24Fix a possible memory leak in req_mainBernd Edlinger
if the private key is output to stdout using the HARNESS_OSSL_PREFIX, out is a stack of BIOs and must therefore free'd using BIO_free_all. Steps to reproduce: $ HARNESS_OSSL_PREFIX=x OPENSSL_CONF=apps/openssl.cnf util/shlib_wrap.sh apps/openssl req -new -keyout - -passout pass: </dev/null [...] Direct leak of 128 byte(s) in 1 object(s) allocated from: #0 0x7f6f692b89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f6f686eda00 in CRYPTO_malloc crypto/mem.c:202 #2 0x7f6f686edba0 in CRYPTO_zalloc crypto/mem.c:222 #3 0x7f6f68471bdf in BIO_new_ex crypto/bio/bio_lib.c:83 #4 0x7f6f68491a8f in BIO_new_fp crypto/bio/bss_file.c:95 #5 0x555c5f58b378 in dup_bio_out apps/lib/apps.c:3014 #6 0x555c5f58f9ac in bio_open_default_ apps/lib/apps.c:3175 #7 0x555c5f58f9ac in bio_open_default apps/lib/apps.c:3203 #8 0x555c5f528537 in req_main apps/req.c:683 #9 0x555c5f50e315 in do_cmd apps/openssl.c:426 #10 0x555c5f4c5575 in main apps/openssl.c:307 #11 0x7f6f680461c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 SUMMARY: AddressSanitizer: 128 byte(s) leaked in 1 allocation(s). Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23365) (cherry picked from commit ff78d94b131d7bb3b761509d3ce0dd864b1420e3)
2024-01-23ci.yml: Replace actions-rs/toolchain@v1 with dtolnay/rust-toolchainTomas Mraz
actions-rs/toolchain is unmaintained and generates warnings Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23232) (cherry picked from commit cd5911a6b300453eefb4b6d9d797c9d1cdefb956)
2024-01-23tlsfuzzer.sh: Use python3Tomas Mraz
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23342) (cherry picked from commit 15f479e25f9591a2749fabb436dcdfb9304c5c7b)
2024-01-23tlsfuzzer.sh: Make it more informative on errorsTomas Mraz
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23342) (cherry picked from commit 825b7cb16e0624d81421441949e843e9876c81f9)
2024-01-23tlsfuzzer.sh: Run openssl version on the built app and not system oneTomas Mraz
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23342) (cherry picked from commit 150b3b18dfde317621a6bf26acfe0d06193e52fd)
2024-01-23gost_engine.sh: Set OPENSSL_ENGINES_DIRTomas Mraz
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23342) (cherry picked from commit 017c7cf2bb5f5461071d9e992eb3206c34a69c2c)
2024-01-19Uninitialized array variableshashankmca80
array"key" is uninitialized and it is being read directly in function SipHash_Init() as per the below statements making a way for the garbage values : uint64_t k0 = U8TO64_LE(k); uint64_t k1 = U8TO64_LE(k + 8); CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23298) (cherry picked from commit a0826b184eed2dccc56cdf80e3e0bc061cc89ddc)
2024-01-19Document SSL_R_UNEXPECTED_EOF_WHILE_READINGMatt Caswell
Also document that it is ok to use this for control flow decisions. Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23327)
2024-01-18X509_dup.pod: add caveat that extra data is not copied and hints, e.g., to ↵Dr. David von Oheimb
use X509_up_ref() instead Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23043) (cherry picked from commit 66adaf2b31bb51e00ffad784f60bdf195e5dd736)
2024-01-18Add a deprecation warning for a function in docsKevin Jerebica
The function in question is SSL_get_peer_certificate() CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23315) (cherry picked from commit 3e938453be47751d50917e25b8f7334b482844b3)
2024-01-16Check whether the pubkey exists in ossl_ecx_key_duplan1120
Signed-off-by: lan1120 <lanming@huawei.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22984) (cherry picked from commit aac531e5daa2edec5d47e702a7f115cf77fe07f9)
2024-01-15Error in s_server when -rev option is used with dtls.Frederik Wedel-Heinen
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23278) (cherry picked from commit 575117efe1e0eb8073c2d26ae3dff8926be00591)
2024-01-15Add CHANGES.md and NEWS.md entries for CVE-2023-6237Tomas Mraz
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23243) (cherry picked from commit 38b2508f638787842750aec9a75745e1d8786743)
2024-01-15Limit the execution time of RSA public key checkTomas Mraz
Fixes CVE-2023-6237 If a large and incorrect RSA public key is checked with EVP_PKEY_public_check() the computation could take very long time due to no limit being applied to the RSA public key size and unnecessarily high number of Miller-Rabin algorithm rounds used for non-primality check of the modulus. Now the keys larger than 16384 bits (OPENSSL_RSA_MAX_MODULUS_BITS) will fail the check with RSA_R_MODULUS_TOO_LARGE error reason. Also the number of Miller-Rabin rounds was set to 5. Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23243) (cherry picked from commit e09fc1d746a4fd15bb5c3d7bbbab950aadd005db)
2024-01-15Fix arithmetic expression overflowDrokov Pavel
If the value of a->length is large (>= 2^12), then an integer overflow will occur for the signed type, which according to the C standard is UB. CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23274) (cherry picked from commit 486ab0fb003d05f89620662260486d31bd3faa8c)
2024-01-12Add test/recipes/15-test_gensm2.t, to test SM2 key generation resultsRichard Levitte
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22529) (cherry picked from commit d4d9b57530b2ecdca6b4263b5841b42c820e5275)
2024-01-12Fix the encoding of SM2 keysRichard Levitte
OpenSSL's encoding of SM2 keys used the SM2 OID for the algorithm OID where an AlgorithmIdentifier is encoded (for encoding into the structures PrivateKeyInfo and SubjectPublicKeyInfo). Such keys should be encoded as ECC keys. Fixes #22184 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22529) (cherry picked from commit 1d490694dfa790d8e47f8f2ea62ea1d9b1251179)