summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/crypto/evp.h2
-rw-r--r--providers/implementations/include/prov/ciphercommon.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index eeac4ee9f1..e571c546c6 100644
--- a/include/crypto/evp.h
+++ b/include/crypto/evp.h
@@ -365,7 +365,7 @@ static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns
return 1;\
}
-#define EVP_MAXCHUNK ((size_t)1<<(sizeof(long)*8-2))
+#define EVP_MAXCHUNK ((size_t)1 << 30)
#define BLOCK_CIPHER_func_ofb(cname, cprefix, cbits, kstruct, ksched) \
static int cname##_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) \
diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h
index 91c4c914be..30a59e5572 100644
--- a/providers/implementations/include/prov/ciphercommon.h
+++ b/providers/implementations/include/prov/ciphercommon.h
@@ -14,8 +14,8 @@
#include "internal/cryptlib.h"
#include "crypto/modes.h"
-#define MAXCHUNK ((size_t)1 << (sizeof(long) * 8 - 2))
-#define MAXBITCHUNK ((size_t)1 << (sizeof(size_t) * 8 - 4))
+# define MAXCHUNK ((size_t)1 << 30)
+# define MAXBITCHUNK ((size_t)1 << (sizeof(size_t) * 8 - 4))
#define GENERIC_BLOCK_SIZE 16
#define IV_STATE_UNINITIALISED 0 /* initial state is not initialized */