Fix legacy_ctrl_to_param() to pay better attention to keytype
authorRichard Levitte <levitte@openssl.org>
Sat, 14 Mar 2020 04:16:16 +0000 (05:16 +0100)
committerRichard Levitte <levitte@openssl.org>
Sun, 15 Mar 2020 09:07:58 +0000 (10:07 +0100)
commit2decdad31d36fdd36e1de3608a8a7a55a873e1f8
tree3e6d9ec9f1ad3ec2dd989dfd43e52be44c17e196
parentd16d0b71a9a31bf61289518a8ae523131f293faf
Fix legacy_ctrl_to_param() to pay better attention to keytype

The keytype number will only be -1 when control commands are used for
more than one key type.  Sometimes, they share the same underlying
structure, and sometimes not.

Some of the RSA control commands that are using only with the keytype
EVP_PKEY_RSA we misplaced to be handled with the keytype -1.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11329)
crypto/evp/pmeth_lib.c