From: Richard Levitte Date: Thu, 10 Oct 2019 16:16:19 +0000 (+0200) Subject: Remove EVP_CIPH_FLAG_CUSTOM_CIPHER in all our providers X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5b084ca0492cee7aeca63e0a50dbff7487e3ee41;p=oweals%2Fopenssl.git Remove EVP_CIPH_FLAG_CUSTOM_CIPHER in all our providers Not needed any more, since the presence of the OSSL_FUNC_CIPHER_CIPHER function is enough to tell that there's a custom cipher function. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10137) --- diff --git a/providers/common/include/prov/cipher_aead.h b/providers/common/include/prov/cipher_aead.h index 0b7d595b7d..db938d7fbe 100644 --- a/providers/common/include/prov/cipher_aead.h +++ b/providers/common/include/prov/cipher_aead.h @@ -12,7 +12,6 @@ /* TODO(3.0) Figure out what flags are really needed */ #define AEAD_FLAGS (EVP_CIPH_FLAG_AEAD_CIPHER \ | EVP_CIPH_CUSTOM_IV \ - | EVP_CIPH_FLAG_CUSTOM_CIPHER \ | EVP_CIPH_ALWAYS_CALL_INIT \ | EVP_CIPH_CTRL_INIT \ | EVP_CIPH_CUSTOM_COPY) diff --git a/providers/implementations/ciphers/cipher_aes_wrp.c b/providers/implementations/ciphers/cipher_aes_wrp.c index 9eaec16318..028676943e 100644 --- a/providers/implementations/ciphers/cipher_aes_wrp.c +++ b/providers/implementations/ciphers/cipher_aes_wrp.c @@ -16,9 +16,8 @@ #define AES_WRAP_NOPAD_IVLEN 8 /* TODO(3.0) Figure out what flags need to be passed */ -#define WRAP_FLAGS (EVP_CIPH_WRAP_MODE \ - | EVP_CIPH_CUSTOM_IV | EVP_CIPH_FLAG_CUSTOM_CIPHER \ - | EVP_CIPH_ALWAYS_CALL_INIT) +#define WRAP_FLAGS (EVP_CIPH_WRAP_MODE | EVP_CIPH_CUSTOM_IV \ + | EVP_CIPH_ALWAYS_CALL_INIT) typedef size_t (*aeswrap_fn)(void *key, const unsigned char *iv, unsigned char *out, const unsigned char *in, diff --git a/providers/implementations/ciphers/cipher_tdes_wrap.c b/providers/implementations/ciphers/cipher_tdes_wrap.c index b26f2cb403..d899985202 100644 --- a/providers/implementations/ciphers/cipher_tdes_wrap.c +++ b/providers/implementations/ciphers/cipher_tdes_wrap.c @@ -15,9 +15,7 @@ #include "prov/providercommonerr.h" /* TODO (3.0) Figure out what flags are requred */ -#define TDES_WRAP_FLAGS (EVP_CIPH_WRAP_MODE \ - | EVP_CIPH_CUSTOM_IV \ - | EVP_CIPH_FLAG_CUSTOM_CIPHER) +#define TDES_WRAP_FLAGS (EVP_CIPH_WRAP_MODE | EVP_CIPH_CUSTOM_IV) static OSSL_OP_cipher_update_fn tdes_wrap_update;