aboutsummaryrefslogtreecommitdiff
path: root/test/endecode_test.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-02 14:21:51 +0200
committerRichard Levitte <levitte@openssl.org>2020-10-04 13:01:47 +0200
commit70c06aafa691a77861bd3d3aaf93afa2a55e04ce (patch)
tree2ccf9e7a520951f69585d9afaa1d82fe4bc4f7a5 /test/endecode_test.c
parentecadfdadde491572b0bdf3c5a95e7a6a004585c6 (diff)
downloadopenssl-70c06aafa691a77861bd3d3aaf93afa2a55e04ce.zip
openssl-70c06aafa691a77861bd3d3aaf93afa2a55e04ce.tar.gz
openssl-70c06aafa691a77861bd3d3aaf93afa2a55e04ce.tar.bz2
DECODER: Allow precise result type for OSSL_DECODER_CTX_new_by_EVP_PKEY()
There is some data that is very difficult to guess. For example, DSA parameters and X9.42 DH parameters look exactly the same, a SEQUENCE of 3 INTEGER. Therefore, callers may need the possibility to select the exact keytype that they expect to get. This will also allow use to translate d2i_TYPEPrivateKey(), d2i_TYPEPublicKey() and d2i_TYPEParams() into OSSL_DECODER terms much more smoothly. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13061)
Diffstat (limited to 'test/endecode_test.c')
-rw-r--r--test/endecode_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/endecode_test.c b/test/endecode_test.c
index 7f37a99..70258af 100644
--- a/test/endecode_test.c
+++ b/test/endecode_test.c
@@ -201,7 +201,7 @@ static int decode_EVP_PKEY_prov(void **object, void *encoded, long encoded_len,
const unsigned char *upass = (const unsigned char *)pass;
int ok = 0;
- if (!TEST_ptr(dctx = OSSL_DECODER_CTX_new_by_EVP_PKEY(&pkey, NULL,
+ if (!TEST_ptr(dctx = OSSL_DECODER_CTX_new_by_EVP_PKEY(&pkey, NULL, NULL,
NULL, NULL))
|| (pass != NULL
&& !OSSL_DECODER_CTX_set_passphrase(dctx, upass, strlen(pass)))