summaryrefslogtreecommitdiffstats
path: root/test/endecoder_legacy_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/endecoder_legacy_test.c')
-rw-r--r--test/endecoder_legacy_test.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/endecoder_legacy_test.c b/test/endecoder_legacy_test.c
index ffaa25da7b..64bbea0ad1 100644
--- a/test/endecoder_legacy_test.c
+++ b/test/endecoder_legacy_test.c
@@ -317,9 +317,9 @@ static int test_protected_PEM(const char *keytype, int evp_type,
goto end;
if (!TEST_ptr(ectx =
- OSSL_ENCODER_CTX_new_by_EVP_PKEY(provided_pkey, selection,
- "PEM", structure,
- NULL))
+ OSSL_ENCODER_CTX_new_for_pkey(provided_pkey, selection,
+ "PEM", structure,
+ NULL))
|| !TEST_true(OSSL_ENCODER_to_bio(ectx, membio_provided))
|| !TEST_true(pem_write_bio(membio_legacy, legacy_key,
NULL, NULL, 0, NULL, NULL))
@@ -331,10 +331,10 @@ static int test_protected_PEM(const char *keytype, int evp_type,
if (!TEST_ptr(decoded_legacy_pkey = EVP_PKEY_new())
|| !TEST_ptr(dctx =
- OSSL_DECODER_CTX_new_by_EVP_PKEY(&decoded_provided_pkey,
- "PEM", structure,
- keytype, selection,
- NULL, NULL))
+ OSSL_DECODER_CTX_new_for_pkey(&decoded_provided_pkey,
+ "PEM", structure,
+ keytype, selection,
+ NULL, NULL))
|| !TEST_true(OSSL_DECODER_from_bio(dctx, membio_provided))
|| !TEST_ptr(decoded_legacy_key =
pem_read_bio(membio_legacy, NULL, NULL, NULL))
@@ -385,9 +385,9 @@ static int test_unprotected_PEM(const char *keytype, int evp_type,
goto end;
if (!TEST_ptr(ectx =
- OSSL_ENCODER_CTX_new_by_EVP_PKEY(provided_pkey, selection,
- "PEM", structure,
- NULL))
+ OSSL_ENCODER_CTX_new_for_pkey(provided_pkey, selection,
+ "PEM", structure,
+ NULL))
|| !TEST_true(OSSL_ENCODER_to_bio(ectx, membio_provided))
|| !TEST_true(pem_write_bio(membio_legacy, legacy_key))
|| !test_membio_str_eq(membio_provided, membio_legacy))
@@ -398,10 +398,10 @@ static int test_unprotected_PEM(const char *keytype, int evp_type,
if (!TEST_ptr(decoded_legacy_pkey = EVP_PKEY_new())
|| !TEST_ptr(dctx =
- OSSL_DECODER_CTX_new_by_EVP_PKEY(&decoded_provided_pkey,
- "PEM", structure,
- keytype, selection,
- NULL, NULL))
+ OSSL_DECODER_CTX_new_for_pkey(&decoded_provided_pkey,
+ "PEM", structure,
+ keytype, selection,
+ NULL, NULL))
|| !TEST_true(OSSL_DECODER_from_bio(dctx, membio_provided))
|| !TEST_ptr(decoded_legacy_key =
pem_read_bio(membio_legacy, NULL, NULL, NULL))
@@ -450,9 +450,9 @@ static int test_DER(const char *keytype, int evp_type,
EVP_PKEY *decoded_provided_pkey = NULL;
if (!TEST_ptr(ectx =
- OSSL_ENCODER_CTX_new_by_EVP_PKEY(provided_pkey, selection,
- "DER", structure,
- NULL))
+ OSSL_ENCODER_CTX_new_for_pkey(provided_pkey, selection,
+ "DER", structure,
+ NULL))
|| !TEST_true(OSSL_ENCODER_to_data(ectx,
&der_provided, &der_provided_len))
|| !TEST_size_t_gt(der_legacy_len = i2d(legacy_key, &der_legacy), 0)
@@ -465,10 +465,10 @@ static int test_DER(const char *keytype, int evp_type,
if (!TEST_ptr(decoded_legacy_pkey = EVP_PKEY_new())
|| !TEST_ptr(dctx =
- OSSL_DECODER_CTX_new_by_EVP_PKEY(&decoded_provided_pkey,
- "DER", structure,
- keytype, selection,
- NULL, NULL))
+ OSSL_DECODER_CTX_new_for_pkey(&decoded_provided_pkey,
+ "DER", structure,
+ keytype, selection,
+ NULL, NULL))
|| !TEST_true((pder_provided = der_provided,
tmp_size = der_provided_len,
OSSL_DECODER_from_data(dctx, &pder_provided,