summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorBenjamin Kaduk <bkaduk@akamai.com>2020-07-02 14:12:33 -0700
committerBenjamin Kaduk <bkaduk@akamai.com>2020-08-11 07:07:58 -0700
commit2f5c405a1694220cca7be8cd96958c1c1245f0ed (patch)
tree746b575781af4a6881efbec03ff149ec817d983e /crypto/evp
parentd91f902d73689c8a8c1bf684ff9d244197f8c7b3 (diff)
Use local IV storage in EVP BLOCK_* macros
Inline the pre-13273237a65d46186b6bea0b51aec90670d4598a versions of EVP_CIPHER_CTX_iv(), EVP_CIPHER_CTX_original_iv(), and EVP_CIPHER_CTX_iv_noconst() in evp.h. These macros are internal-only, used to implement legacy libcrypto EVP ciphers, with no real provider involvement. Accordingly, just use the EVP_CIPHER_CTX storage directly and don't try to reach into a provider-side context. This does necessitate including evp_local.h in several more files. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12233)
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/e_bf.c1
-rw-r--r--crypto/evp/e_cast.c1
-rw-r--r--crypto/evp/e_idea.c1
-rw-r--r--crypto/evp/e_rc2.c1
-rw-r--r--crypto/evp/e_seed.c1
5 files changed, 5 insertions, 0 deletions
diff --git a/crypto/evp/e_bf.c b/crypto/evp/e_bf.c
index c9ca56dc70..9e240d1124 100644
--- a/crypto/evp/e_bf.c
+++ b/crypto/evp/e_bf.c
@@ -20,6 +20,7 @@
# include "crypto/evp.h"
# include <openssl/objects.h>
# include <openssl/blowfish.h>
+# include "evp_local.h"
static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
diff --git a/crypto/evp/e_cast.c b/crypto/evp/e_cast.c
index 9ee06d060b..8325a5f8d2 100644
--- a/crypto/evp/e_cast.c
+++ b/crypto/evp/e_cast.c
@@ -21,6 +21,7 @@
# include <openssl/objects.h>
# include "crypto/evp.h"
# include <openssl/cast.h>
+# include "evp_local.h"
static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
diff --git a/crypto/evp/e_idea.c b/crypto/evp/e_idea.c
index 43665887da..a4778a2c05 100644
--- a/crypto/evp/e_idea.c
+++ b/crypto/evp/e_idea.c
@@ -22,6 +22,7 @@
# include <openssl/objects.h>
# include "crypto/evp.h"
# include <openssl/idea.h>
+# include "evp_local.h"
/* Can't use IMPLEMENT_BLOCK_CIPHER because IDEA_ecb_encrypt is different */
diff --git a/crypto/evp/e_rc2.c b/crypto/evp/e_rc2.c
index e8d7106935..a8fb18e72d 100644
--- a/crypto/evp/e_rc2.c
+++ b/crypto/evp/e_rc2.c
@@ -22,6 +22,7 @@
# include <openssl/objects.h>
# include "crypto/evp.h"
# include <openssl/rc2.h>
+# include "evp_local.h"
static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
diff --git a/crypto/evp/e_seed.c b/crypto/evp/e_seed.c
index 3f223ce936..98c7385f61 100644
--- a/crypto/evp/e_seed.c
+++ b/crypto/evp/e_seed.c
@@ -20,6 +20,7 @@
#include <assert.h>
#include <openssl/seed.h>
#include "crypto/evp.h"
+#include "evp_local.h"
static int seed_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);