Add a gettable for provider ciphers to return the EVP_CIPH_RAND_KEY flag
authorShane Lontis <shane.lontis@oracle.com>
Thu, 3 Jun 2021 09:09:38 +0000 (19:09 +1000)
committerPauli <pauli@openssl.org>
Tue, 8 Jun 2021 05:16:06 +0000 (15:16 +1000)
commitf41fd10d90fb5202f4c05f8842b4a4f25afd51d0
tree09106bd79af443731ff67bee224ec5609d632c7a
parent5135a9bd9280301a24640a6bf5125c144e28cfdd
Add a gettable for provider ciphers to return the EVP_CIPH_RAND_KEY flag

Fixes #15531

DES and TDES set this flag which could possibly be used by applications.
The gettable cipher param OSSL_CIPHER_PARAM_HAS_RAND_KEY has been added.

Note that EVP_CIPHER_CTX_rand_key() uses this flag.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15606)
crypto/evp/evp_lib.c
doc/man3/EVP_EncryptInit.pod
include/openssl/core_names.h
providers/implementations/ciphers/cipher_des.c
providers/implementations/ciphers/cipher_tdes.h
providers/implementations/ciphers/cipher_tdes_wrap.c
providers/implementations/ciphers/ciphercommon.c
providers/implementations/include/prov/ciphercommon.h
test/evp_libctx_test.c