aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/des/cbc_enc.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-06-09 11:08:36 +0000
committerBen Laurie <ben@openssl.org>1999-06-09 11:08:36 +0000
commit05861c77e7f4d862866a4398e146fdc68ab2a957 (patch)
tree6bf851673003965c04aee536eaf591a5e4d2bbc0 /crypto/des/cbc_enc.c
parent233bf734d3dc2033ab24578fa9bf83a1e8e6b97e (diff)
downloadopenssl-05861c77e7f4d862866a4398e146fdc68ab2a957.tar.gz
I keep forgetting to fix this: update the IV! Most important!
Diffstat (limited to 'crypto/des/cbc_enc.c')
-rw-r--r--crypto/des/cbc_enc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/des/cbc_enc.c b/crypto/des/cbc_enc.c
index 4ccabc911a..668fb150d5 100644
--- a/crypto/des/cbc_enc.c
+++ b/crypto/des/cbc_enc.c
@@ -94,6 +94,9 @@ void des_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
tout0=tin[0]; l2c(tout0,out);
tout1=tin[1]; l2c(tout1,out);
}
+ iv = &(*ivec)[0];
+ l2c(tout0,iv);
+ l2c(tout1,iv);
}
else
{
@@ -122,6 +125,9 @@ void des_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
/* xor0=tin0;
xor1=tin1; */
}
+ iv = &(*ivec)[0];
+ l2c(xor0,iv);
+ l2c(xor1,iv);
}
tin0=tin1=tout0=tout1=xor0=xor1=0;
tin[0]=tin[1]=0;