summaryrefslogtreecommitdiff
path: root/crypto/mdc2
diff options
context:
space:
mode:
authorbodo <bodo>1999-12-03 20:23:26 +0000
committerbodo <bodo>1999-12-03 20:23:26 +0000
commit9309826d80f5c89eca01d7310ed39d3edafb0927 (patch)
treeea5c3e71abfc5a4c0e67f368509e0ad9f2e94ae7 /crypto/mdc2
parent760273413d95b624878cdca6137c2327174b87a9 (diff)
downloadopenssl-9309826d80f5c89eca01d7310ed39d3edafb0927.tar.gz
Add functions des_set_key_checked, des_set_key_unchecked.
Never use des_set_key (it depends on the global variable des_check_key), but usually des_set_key_unchecked. Only destest.c bothered to look at the return values of des_set_key, but it did not set des_check_key -- if it had done so, most checks would have failed because of wrong parity and because of weak keys.
Diffstat (limited to 'crypto/mdc2')
-rw-r--r--crypto/mdc2/mdc2dgst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/mdc2/mdc2dgst.c b/crypto/mdc2/mdc2dgst.c
index 4fc39ed86..aed715c69 100644
--- a/crypto/mdc2/mdc2dgst.c
+++ b/crypto/mdc2/mdc2dgst.c
@@ -135,11 +135,11 @@ static void mdc2_body(MDC2_CTX *c, unsigned char *in, unsigned int len)
c->hh[0]=(c->hh[0]&0x9f)|0x20;
des_set_odd_parity(&c->h);
- des_set_key(&c->h,k);
+ des_set_key_unchecked(&c->h,k);
des_encrypt(d,k,1);
des_set_odd_parity(&c->hh);
- des_set_key(&c->hh,k);
+ des_set_key_unchecked(&c->hh,k);
des_encrypt(dd,k,1);
ttin0=tin0^dd[0];