diff options
author | Richard Levitte <levitte@openssl.org> | 2020-11-27 08:03:23 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-12-02 13:37:20 +0100 |
commit | b03da688a223c18b5a10b5a66abe229bbb590133 (patch) | |
tree | 9ced964fd56b31be881234f012af7d191f41c5ef /test | |
parent | cbcbac644c4679e535948e49983d335ae46c578e (diff) |
Adapt everything else to the updated OSSL_ENCODER_CTX_new_by_EVP_PKEY()
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13545)
Diffstat (limited to 'test')
-rw-r--r-- | test/endecode_test.c | 2 | ||||
-rw-r--r-- | test/endecoder_legacy_test.c | 6 | ||||
-rw-r--r-- | test/evp_libctx_test.c | 2 | ||||
-rw-r--r-- | test/evp_pkey_provided_test.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/test/endecode_test.c b/test/endecode_test.c index d7edd350a1..f72f9aaac8 100644 --- a/test/endecode_test.c +++ b/test/endecode_test.c @@ -195,7 +195,7 @@ static int encode_EVP_PKEY_prov(void **encoded, long *encoded_len, if (!TEST_ptr(ectx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, selection, output_type, output_structure, - NULL, NULL)) + NULL)) || !TEST_int_gt(OSSL_ENCODER_CTX_get_num_encoders(ectx), 0) || (pass != NULL && !TEST_true(OSSL_ENCODER_CTX_set_passphrase(ectx, upass, diff --git a/test/endecoder_legacy_test.c b/test/endecoder_legacy_test.c index 467c072b3e..ffaa25da7b 100644 --- a/test/endecoder_legacy_test.c +++ b/test/endecoder_legacy_test.c @@ -319,7 +319,7 @@ static int test_protected_PEM(const char *keytype, int evp_type, if (!TEST_ptr(ectx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(provided_pkey, selection, "PEM", structure, - NULL, NULL)) + NULL)) || !TEST_true(OSSL_ENCODER_to_bio(ectx, membio_provided)) || !TEST_true(pem_write_bio(membio_legacy, legacy_key, NULL, NULL, 0, NULL, NULL)) @@ -387,7 +387,7 @@ static int test_unprotected_PEM(const char *keytype, int evp_type, if (!TEST_ptr(ectx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(provided_pkey, selection, "PEM", structure, - NULL, NULL)) + 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)) @@ -452,7 +452,7 @@ static int test_DER(const char *keytype, int evp_type, if (!TEST_ptr(ectx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(provided_pkey, selection, "DER", structure, - NULL, NULL)) + 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) diff --git a/test/evp_libctx_test.c b/test/evp_libctx_test.c index a1540dd4b9..cf39bf0871 100644 --- a/test/evp_libctx_test.c +++ b/test/evp_libctx_test.c @@ -461,7 +461,7 @@ static int rsa_keygen(int bits, EVP_PKEY **pub, EVP_PKEY **priv) OSSL_ENCODER_CTX_new_by_EVP_PKEY(*priv, EVP_PKEY_PUBLIC_KEY, "DER", "type-specific", - libctx, NULL)) + NULL)) || !TEST_true(OSSL_ENCODER_to_data(ectx, &pub_der, &len))) goto err; pp = pub_der; diff --git a/test/evp_pkey_provided_test.c b/test/evp_pkey_provided_test.c index 7d12a919c1..a5604b4fdf 100644 --- a/test/evp_pkey_provided_test.c +++ b/test/evp_pkey_provided_test.c @@ -217,7 +217,7 @@ static int test_print_key_type_using_encoder(const char *alg, int type, if (!TEST_ptr(ctx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(pk, selection, output_type, output_structure, - NULL, NULL)) + NULL)) /* Check that this operation is supported */ || !TEST_int_ne(OSSL_ENCODER_CTX_get_num_encoders(ctx), 0)) goto err; |