aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-02-28 19:59:30 +0100
committerHans Nilsson <[email protected]>2019-03-19 12:45:54 +0100
commitfcc89ded7f5cb5f81533883c30e7daa89195970d (patch)
tree9c8338ae42ef54f4c3be7095b6317201e0d99647 /lib/crypto/c_src
parent47b496da10cfedeea8a0341ce13c76de3c132a57 (diff)
downloadotp-fcc89ded7f5cb5f81533883c30e7daa89195970d.tar.gz
otp-fcc89ded7f5cb5f81533883c30e7daa89195970d.tar.bz2
otp-fcc89ded7f5cb5f81533883c30e7daa89195970d.zip
crypto: Remove condition of block size
Unnecessary, because the underlying crypto libraries handles this case. Also: - Relax the condition of binary Key and IV -Fix bug for empty data on historic cryptolibs because tests fails for empty data on at least aes_cfb8 on OpenSSL 0.9.8h. It does not fail on OpenSSL 0.9.8zh.
Diffstat (limited to 'lib/crypto/c_src')
-rw-r--r--lib/crypto/c_src/api_ng.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/crypto/c_src/api_ng.c b/lib/crypto/c_src/api_ng.c
index c4114d1626..f24aded748 100644
--- a/lib/crypto/c_src/api_ng.c
+++ b/lib/crypto/c_src/api_ng.c
@@ -165,8 +165,6 @@ ERL_NIF_TERM ng_crypto_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ASSERT(in_data_bin.size =< INT_MAX);
block_size = EVP_CIPHER_CTX_block_size(ctx->ctx);
- if (in_data_bin.size % (size_t)block_size != 0)
- return ERROR_Str(env, "Data not a multiple of block size");
if (argc==3) {
if (!enif_inspect_iolist_as_binary(env, argv[2], &ivec_bin))