diff options
author | Richard Levitte <levitte@openssl.org> | 2019-09-25 09:07:20 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-01 22:51:00 +0200 |
commit | 6ef81d388d78ad417f6fc5d02ef61b54995c5335 (patch) | |
tree | 2f39645dbd771d3c90e2eb87427afdb183264592 /providers/common | |
parent | c96399e296d9c280115d2ed9c129399c61b8edfc (diff) |
Remove EVP_CIPH_FLAG_DEFAULT_ASN1 from all provided implementations
Since that flag has lost its relevance, don't use it any more.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10008)
Diffstat (limited to 'providers/common')
-rw-r--r-- | providers/common/ciphers/cipher_aes_wrp.c | 2 | ||||
-rw-r--r-- | providers/common/ciphers/cipher_aes_xts.c | 5 | ||||
-rw-r--r-- | providers/common/include/internal/ciphers/cipher_aead.h | 10 | ||||
-rw-r--r-- | providers/common/include/internal/ciphers/cipher_tdes.h | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/providers/common/ciphers/cipher_aes_wrp.c b/providers/common/ciphers/cipher_aes_wrp.c index ae05aed540..70f387f515 100644 --- a/providers/common/ciphers/cipher_aes_wrp.c +++ b/providers/common/ciphers/cipher_aes_wrp.c @@ -18,7 +18,7 @@ /* 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 | EVP_CIPH_FLAG_DEFAULT_ASN1) + | 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/common/ciphers/cipher_aes_xts.c b/providers/common/ciphers/cipher_aes_xts.c index 0d642368b3..f114793ba8 100644 --- a/providers/common/ciphers/cipher_aes_xts.c +++ b/providers/common/ciphers/cipher_aes_xts.c @@ -12,8 +12,9 @@ #include "internal/providercommonerr.h" /* TODO (3.0) Figure out what flags need to be set */ -#define AES_XTS_FLAGS (EVP_CIPH_FLAG_DEFAULT_ASN1 | EVP_CIPH_CUSTOM_IV \ - | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT \ +#define AES_XTS_FLAGS (EVP_CIPH_CUSTOM_IV \ + | EVP_CIPH_ALWAYS_CALL_INIT \ + | EVP_CIPH_CTRL_INIT \ | EVP_CIPH_CUSTOM_COPY) #define AES_XTS_IV_BITS 128 diff --git a/providers/common/include/internal/ciphers/cipher_aead.h b/providers/common/include/internal/ciphers/cipher_aead.h index 1ddba1c325..0b7d595b7d 100644 --- a/providers/common/include/internal/ciphers/cipher_aead.h +++ b/providers/common/include/internal/ciphers/cipher_aead.h @@ -10,10 +10,12 @@ #define UNINITIALISED_SIZET ((size_t)-1) /* TODO(3.0) Figure out what flags are really needed */ -#define AEAD_FLAGS (EVP_CIPH_FLAG_AEAD_CIPHER | EVP_CIPH_FLAG_DEFAULT_ASN1 \ - | EVP_CIPH_CUSTOM_IV | EVP_CIPH_FLAG_CUSTOM_CIPHER \ - | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT \ - | EVP_CIPH_CUSTOM_COPY) +#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) #define IMPLEMENT_aead_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \ static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \ diff --git a/providers/common/include/internal/ciphers/cipher_tdes.h b/providers/common/include/internal/ciphers/cipher_tdes.h index 120201d1ad..7bb879fb4f 100644 --- a/providers/common/include/internal/ciphers/cipher_tdes.h +++ b/providers/common/include/internal/ciphers/cipher_tdes.h @@ -14,7 +14,7 @@ #define TDES_IVLEN 8 /* TODO(3.0) Figure out what flags need to be here */ -#define TDES_FLAGS (EVP_CIPH_RAND_KEY | EVP_CIPH_FLAG_DEFAULT_ASN1) +#define TDES_FLAGS (EVP_CIPH_RAND_KEY) typedef struct prov_tdes_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ |