From: Richard Levitte Date: Thu, 19 Dec 2019 12:33:35 +0000 (+0100) Subject: EVP & PROV: Fix all platform inclusions X-Git-Tag: openssl-3.0.0-alpha1~793 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cc731bc3f66701cad1de07dfc9ba64d0fc709d45;p=oweals%2Fopenssl.git EVP & PROV: Fix all platform inclusions Reviewed-by: Shane Lontis Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10662) --- diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index b95adf0bbf..29836844d4 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -20,7 +20,7 @@ #include "internal/cryptlib.h" #include "crypto/modes.h" #include "crypto/siv.h" -#include "crypto/ciphermode_platform.h" +#include "crypto/aes_platform.h" #include "evp_local.h" typedef struct { diff --git a/crypto/evp/e_camellia.c b/crypto/evp/e_camellia.c index 50febca9bc..1c75c3a4c0 100644 --- a/crypto/evp/e_camellia.c +++ b/crypto/evp/e_camellia.c @@ -19,7 +19,7 @@ NON_EMPTY_TRANSLATION_UNIT # include # include "crypto/evp.h" # include "crypto/modes.h" -# include "crypto/ciphermode_platform.h" +# include "crypto/cmll_platform.h" static int camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc); diff --git a/providers/build.info b/providers/build.info index 2121a72cb2..6d4f6ae82c 100644 --- a/providers/build.info +++ b/providers/build.info @@ -40,7 +40,7 @@ $LIBNONFIPS=libnonfips.a $LIBFIPS=libfips.a # Enough of our implementations include prov/ciphercommon.h (present in -# providers/implementations/include), which includes crypto/ciphermode_platform.h +# providers/implementations/include), which includes crypto/*_platform.h # (present in include), which in turn may include very internal header # files in crypto/, so let's have a common include list for them all. $COMMON_INCLUDES=../crypto ../include implementations/include common/include diff --git a/providers/implementations/ciphers/cipher_aes.h b/providers/implementations/ciphers/cipher_aes.h index f05ff1b7d5..f2ee746295 100644 --- a/providers/implementations/ciphers/cipher_aes.h +++ b/providers/implementations/ciphers/cipher_aes.h @@ -9,6 +9,7 @@ #include #include "prov/ciphercommon.h" +#include "crypto/aes_platform.h" typedef struct prov_aes_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/implementations/ciphers/cipher_aes_ccm.h b/providers/implementations/ciphers/cipher_aes_ccm.h index a0dc4b6f25..ee0257c5f6 100644 --- a/providers/implementations/ciphers/cipher_aes_ccm.h +++ b/providers/implementations/ciphers/cipher_aes_ccm.h @@ -10,6 +10,7 @@ #include #include "prov/ciphercommon.h" #include "prov/ciphercommon_ccm.h" +#include "crypto/aes_platform.h" typedef struct prov_aes_ccm_ctx_st { PROV_CCM_CTX base; /* Must be first */ diff --git a/providers/implementations/ciphers/cipher_aes_gcm.h b/providers/implementations/ciphers/cipher_aes_gcm.h index 6c81790640..d7006408de 100644 --- a/providers/implementations/ciphers/cipher_aes_gcm.h +++ b/providers/implementations/ciphers/cipher_aes_gcm.h @@ -10,6 +10,7 @@ #include #include "prov/ciphercommon.h" #include "prov/ciphercommon_gcm.h" +#include "crypto/aes_platform.h" typedef struct prov_aes_gcm_ctx_st { PROV_GCM_CTX base; /* must be first entry in struct */ diff --git a/providers/implementations/ciphers/cipher_aes_ocb.h b/providers/implementations/ciphers/cipher_aes_ocb.h index ba515241e2..94d8183167 100644 --- a/providers/implementations/ciphers/cipher_aes_ocb.h +++ b/providers/implementations/ciphers/cipher_aes_ocb.h @@ -9,6 +9,7 @@ #include #include "prov/ciphercommon.h" +#include "crypto/aes_platform.h" #define OCB_MAX_TAG_LEN AES_BLOCK_SIZE #define OCB_MAX_DATA_LEN AES_BLOCK_SIZE diff --git a/providers/implementations/ciphers/cipher_aes_siv.h b/providers/implementations/ciphers/cipher_aes_siv.h index 8f35d757dc..05411d7012 100644 --- a/providers/implementations/ciphers/cipher_aes_siv.h +++ b/providers/implementations/ciphers/cipher_aes_siv.h @@ -8,7 +8,8 @@ */ #include "prov/ciphercommon.h" -#include "include/crypto/siv.h" +#include "crypto/aes_platform.h" +#include "crypto/siv.h" typedef struct prov_cipher_hw_aes_siv_st { int (*initkey)(void *ctx, const uint8_t *key, size_t keylen); diff --git a/providers/implementations/ciphers/cipher_aes_xts.h b/providers/implementations/ciphers/cipher_aes_xts.h index 615ee61905..23ae696197 100644 --- a/providers/implementations/ciphers/cipher_aes_xts.h +++ b/providers/implementations/ciphers/cipher_aes_xts.h @@ -9,6 +9,7 @@ #include #include "prov/ciphercommon.h" +#include "crypto/aes_platform.h" /* * Available in cipher_fips.c, and compiled with different values depending diff --git a/providers/implementations/ciphers/cipher_camellia.h b/providers/implementations/ciphers/cipher_camellia.h index 58636f1d32..07f67dbad8 100644 --- a/providers/implementations/ciphers/cipher_camellia.h +++ b/providers/implementations/ciphers/cipher_camellia.h @@ -9,6 +9,7 @@ #include "openssl/camellia.h" #include "prov/ciphercommon.h" +#include "crypto/cmll_platform.h" typedef struct prov_camellia_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/implementations/ciphers/cipher_des.h b/providers/implementations/ciphers/cipher_des.h index 92dcfa11e9..aedb38177e 100644 --- a/providers/implementations/ciphers/cipher_des.h +++ b/providers/implementations/ciphers/cipher_des.h @@ -8,6 +8,7 @@ */ #include +#include "crypto/des_platform.h" /* TODO(3.0) Figure out what flags need to be here */ #define TDES_FLAGS (EVP_CIPH_RAND_KEY) diff --git a/providers/implementations/ciphers/cipher_tdes.h b/providers/implementations/ciphers/cipher_tdes.h index 7bb879fb4f..e1fb760e23 100644 --- a/providers/implementations/ciphers/cipher_tdes.h +++ b/providers/implementations/ciphers/cipher_tdes.h @@ -9,6 +9,7 @@ #include #include +#include "crypto/des_platform.h" #define DES_BLOCK_SIZE 8 #define TDES_IVLEN 8 diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h index bf77a4021e..d4dc5ed1db 100644 --- a/providers/implementations/include/prov/ciphercommon.h +++ b/providers/implementations/include/prov/ciphercommon.h @@ -13,7 +13,6 @@ #include #include "internal/cryptlib.h" #include "crypto/modes.h" -#include "crypto/ciphermode_platform.h" #define MAXCHUNK ((size_t)1 << (sizeof(long) * 8 - 2)) #define MAXBITCHUNK ((size_t)1 << (sizeof(size_t) * 8 - 4))