diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-03-23 16:40:53 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-03-25 15:24:00 +0100 |
commit | 4f0831b837e97504d4cfbfecfca069c527be4a2b (patch) | |
tree | 90411cdb7d183a26a30e84f5f5b94add560f7e39 /test/endecode_test.c | |
parent | 468d9d556409a53da2c5d16961f9531dd10a6e1b (diff) |
EVP_PKCS82PKEY: Create provided keys if possible
Use OSSL_DECODER to decode the PKCS8 data to create provided keys.
If that fails fallback to the legacy implementation.
Fixes #14302
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14659)
Diffstat (limited to 'test/endecode_test.c')
-rw-r--r-- | test/endecode_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/endecode_test.c b/test/endecode_test.c index 50b33ce057..ab4b631a8f 100644 --- a/test/endecode_test.c +++ b/test/endecode_test.c @@ -21,6 +21,7 @@ #include "internal/cryptlib.h" /* ossl_assert */ #include "crypto/pem.h" /* For PVK and "blob" PEM headers */ +#include "crypto/evp.h" /* For evp_pkey_is_provided() */ #include "helpers/predefined_dhparams.h" #include "testutil.h" @@ -498,6 +499,7 @@ static int check_unprotected_PKCS8_DER(const char *file, const int line, TEST_note("%s isn't any of %s", type, namelist); OPENSSL_free(namelist); } + ok = ok && TEST_FL_true(evp_pkey_is_provided(pkey)); EVP_PKEY_free(pkey); } } |