DECODER: Allow precise result type for OSSL_DECODER_CTX_new_by_EVP_PKEY()
authorRichard Levitte <levitte@openssl.org>
Fri, 2 Oct 2020 12:21:51 +0000 (14:21 +0200)
committerRichard Levitte <levitte@openssl.org>
Sun, 4 Oct 2020 11:01:47 +0000 (13:01 +0200)
commit70c06aafa691a77861bd3d3aaf93afa2a55e04ce
tree2ccf9e7a520951f69585d9afaa1d82fe4bc4f7a5
parentecadfdadde491572b0bdf3c5a95e7a6a004585c6
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)
crypto/encode_decode/decoder_pkey.c
crypto/store/store_result.c
doc/man3/OSSL_DECODER_CTX_new_by_EVP_PKEY.pod
include/crypto/decoder.h
include/openssl/decoder.h
providers/implementations/storemgmt/file_store.c
test/endecode_test.c