aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-06-19 07:56:28 +0000
committerMartin Willi <martin@strongswan.org>2007-06-19 07:56:28 +0000
commitcbbb71c4ac6f3c59a7c4a009fc17dc9e4d7a60ae (patch)
tree5fc3f0188e606450b61d4835e0274d0c1697413e /src/libstrongswan
parent68352800418624dbf685b051a8b0c512d26899c7 (diff)
downloadstrongswan-cbbb71c4ac6f3c59a7c4a009fc17dc9e4d7a60ae.tar.bz2
strongswan-cbbb71c4ac6f3c59a7c4a009fc17dc9e4d7a60ae.tar.xz
don't modify des/3des input key anymore
Diffstat (limited to 'src/libstrongswan')
-rw-r--r--src/libstrongswan/crypto/crypters/des_crypter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstrongswan/crypto/crypters/des_crypter.c b/src/libstrongswan/crypto/crypters/des_crypter.c
index dc5a8ff55..655cc03ce 100644
--- a/src/libstrongswan/crypto/crypters/des_crypter.c
+++ b/src/libstrongswan/crypto/crypters/des_crypter.c
@@ -871,14 +871,15 @@ static int des_set_key(des_cblock *key, des_key_schedule *schedule)
register unsigned char *in;
register DES_LONG *k;
register int i;
+ des_cblock odd;
for (i = 0; i < sizeof(des_cblock); i++)
{
- (*key)[i] = odd_parity[(*key)[i]];
+ odd[i] = odd_parity[(*key)[i]];
}
k=(DES_LONG *)schedule;
- in=(unsigned char *)key;
+ in=(unsigned char *)&odd;
c2l(in,c);
c2l(in,d);