aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-01-02 16:51:17 +0000
committerRichard Levitte <levitte@openssl.org>2002-01-02 16:51:17 +0000
commitc938563a81d48e1d23bddcf9283d4961794db132 (patch)
treeec9c339f92c66c17e07a41dcde65d90dbd9ca5f4 /crypto
parent40928698bb644180b413b0925425a13fbc92bd2a (diff)
downloadopenssl-c938563a81d48e1d23bddcf9283d4961794db132.zip
openssl-c938563a81d48e1d23bddcf9283d4961794db132.tar.gz
openssl-c938563a81d48e1d23bddcf9283d4961794db132.tar.bz2
The block size may be something other than 8!
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/evp_locl.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h
index 62fbeba..fbf0a3a 100644
--- a/crypto/evp/evp_locl.h
+++ b/crypto/evp/evp_locl.h
@@ -61,10 +61,11 @@
/* Wrapper functions for each cipher mode */
#define BLOCK_CIPHER_ecb_loop() \
- unsigned int i; \
- if(inl < 8) return 1;\
- inl -= 8; \
- for(i=0; i <= inl; i+=8) \
+ unsigned int i, bl; \
+ bl = ctx->cipher->block_size;\
+ if(inl < bl) return 1;\
+ inl -= bl; \
+ for(i=0; i <= inl; i+=bl) \
#define BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \
static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \