From: Mark Eichin Date: Fri, 10 Jun 1994 21:01:17 +0000 (+0000) Subject: use LSBFIRST and MSBFIRST to detect which version of DES we're using. X-Git-Tag: krb5-1.0-beta4~120 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=189304c9ff4e8442d89a4f5d256d578a69b381cb;p=krb5.git use LSBFIRST and MSBFIRST to detect which version of DES we're using. This is the only "invasive" autoconf vs. imake change... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3733 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/des/key_sched.c b/src/lib/crypto/des/key_sched.c index 07bafe97a..465bcdf29 100644 --- a/src/lib/crypto/des/key_sched.c +++ b/src/lib/crypto/des/key_sched.c @@ -54,6 +54,31 @@ static char rcsid_key_sched_c[] = #include #include "des_int.h" +#if !defined(LSBFIRST) && !defined(MSBFIRST) +/* autoconf and Ferguson DES code */ + +void make_key_sched PROTOTYPE((mit_des_cblock, mit_des_key_schedule)); + +int +mit_des_key_sched(k,schedule) + mit_des_cblock k; + mit_des_key_schedule schedule; +{ + if (!mit_des_check_key_parity(k)) /* bad parity --> return -1 */ + return(-1); + + if (mit_des_is_weak_key(k)) + return(-2); + + make_key_sched(k,schedule); + + /* if key was good, return 0 */ + return 0; +} + +#else +/* Imake and MIT DES code */ + #include "key_perm.h" extern int mit_des_debug; @@ -258,3 +283,4 @@ make_key_sched(Key,Schedule) } #endif } +#endif