summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-01-28 08:48:55 +0100
committerRichard Levitte <levitte@openssl.org>2021-03-19 16:46:39 +0100
commit65ef000ec26e6ec2fab2c31f74be1b76275bbbe5 (patch)
tree80fce9e3c46205f44c69007f2090a559848e6a20 /crypto
parent2d101b0f493a3066c5ea7152c00c44d70fcea4d8 (diff)
PROV: Refactor DER->key decoder
The decoding of DER into keys with keytype specific routines depended entirely on the absence of the generic algo specific C type from EVP_PKEYs. That is not necessary, and may even prove to be a bit of a disadvantage, depending on what libcrypto has to offer in terms of type specific d2i functionality for different kinds of input structures. To remedy, we try with all available type specific functions first, and only turn to the general d2i functions (those that return an EVP_PKEY) as a last resort. Furthermore, there are cases where the decoder might not get the key type it expected. This may happen when certain key types that share the same OpenSSL structure may be mixed up somehow. The known cases are EC vs SM2 and RSA vs RSA-PSS. To remedy, we add the possibility to specify a checking function that can check if the key that was decoded meets decoder expectations. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14314)
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions