Remove EVP_CIPH_FLAG_CUSTOM_CIPHER in all our providers
authorRichard Levitte <levitte@openssl.org>
Thu, 10 Oct 2019 16:16:19 +0000 (18:16 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 11 Oct 2019 13:58:15 +0000 (15:58 +0200)
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 <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10137)

providers/common/include/prov/cipher_aead.h
providers/implementations/ciphers/cipher_aes_wrp.c
providers/implementations/ciphers/cipher_tdes_wrap.c

index 0b7d595b7d840254b6248d891aa1bd75130a679e..db938d7fbe0c5566dbb8bc1cc67bc7fdd09d2e92 100644 (file)
@@ -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)
index 9eaec163187337a2c464fc8f8ee530a3aac71185..028676943e33308e5f9870c8d11510de041d0ff2 100644 (file)
@@ -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,
index b26f2cb403dc9025b38fb7a7325651fae0dc749c..d899985202b5d85f2c730ee6bcde565a17e32da3 100644 (file)
@@ -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;