diff options
author | Richard Levitte <levitte@openssl.org> | 2020-10-02 14:21:51 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-10-04 13:01:47 +0200 |
commit | 70c06aafa691a77861bd3d3aaf93afa2a55e04ce (patch) | |
tree | 2ccf9e7a520951f69585d9afaa1d82fe4bc4f7a5 /crypto/store/store_result.c | |
parent | DECODER: Handle abstract object data type (diff) | |
download | openssl-70c06aafa691a77861bd3d3aaf93afa2a55e04ce.tar.xz openssl-70c06aafa691a77861bd3d3aaf93afa2a55e04ce.zip |
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 'crypto/store/store_result.c')
-rw-r--r-- | crypto/store/store_result.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/store/store_result.c b/crypto/store/store_result.c index a591ef23ec..8ba4f8880c 100644 --- a/crypto/store/store_result.c +++ b/crypto/store/store_result.c @@ -257,7 +257,8 @@ static EVP_PKEY *try_key_value(struct extracted_param_data_st *data, if (membio == NULL) return 0; - decoderctx = OSSL_DECODER_CTX_new_by_EVP_PKEY(&pk, "DER", libctx, propq); + decoderctx = + OSSL_DECODER_CTX_new_by_EVP_PKEY(&pk, "DER", NULL, libctx, propq); (void)OSSL_DECODER_CTX_set_passphrase_cb(decoderctx, cb, cbarg); /* No error if this couldn't be decoded */ |