Patch #: 133 Type: cleanup Priority: none Modification: clean up nested #ifdefs for "fast DES" under SunOS Submitted: Rudy Nedved Submitted: David Hornsby Archived: munnari.OZ.AU mac/cap.patches/cap60.patch133 Application: 'cd cap60; patch -p < cap60.patches/cap60.patch133' Summary: move to single #ifdef SUNOS4_FASTDES, use H/W if available Notes: "The fast DES routines are not available outside the U.S." File: cap60/lib/afpc/afpcc.c *** lib/afpc/afpcc.c.orig Thu Jan 14 23:33:06 1993 --- lib/afpc/afpcc.c Tue Apr 13 18:16:07 1993 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1993/01/14 12:32:59 $ ! * $Header: /mac/src/cap60/lib/afpc/RCS/afpcc.c,v 2.3 1993/01/14 12:32:59 djh Rel djh $ ! * $Revision: 2.3 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1993/04/13 08:15:43 $ ! * $Header: /mac/src/cap60/lib/afpc/RCS/afpcc.c,v 2.4 1993/04/13 08:15:43 djh Rel djh $ ! * $Revision: 2.4 $ */ /* *************** *** 28,38 **** #include #include #include ! #ifdef sun ! #ifndef SOLARIS #include ! #endif SOLARIS ! #endif sun eFPAddAPPL(srn, dtr, dirid, fcreator, appltag, path, cr) int srn; --- 28,36 ---- #include #include #include ! #ifdef SUNOS4_FASTDES #include ! #endif SUNOS4_FASTDES eFPAddAPPL(srn, dtr, dirid, fcreator, appltag, path, cr) int srn; *************** *** 526,543 **** return(-1); } #ifdef SUNOS4_FASTDES - #ifdef sunos4_0 des_setparity(passwd); bcopy(lrp.logr_randnum, lcp.lgc_encrypted, sizeof(lcp.lgc_encrypted)); ! ecb_crypt(passwd,lcp.lgc_encrypted,64,DES_ENCRYPT|DES_SW); ! #else sunos4_0 ! #endif SUNOS4_FASTDES dessetkey(passwd); bcopy(lrp.logr_randnum, lcp.lgc_encrypted, sizeof(lcp.lgc_encrypted)); endes(lcp.lgc_encrypted); desdone(); /* clean up (not used except by login) */ - #ifdef SUNOS4_FASTDES - #endif sunos4_0 #endif SUNOS4_FASTDES lcp.lgc_cmd = AFPLoginCont; lcp.lgc_zero = 0; --- 524,537 ---- return(-1); } #ifdef SUNOS4_FASTDES des_setparity(passwd); bcopy(lrp.logr_randnum, lcp.lgc_encrypted, sizeof(lcp.lgc_encrypted)); ! ecb_crypt(passwd,lcp.lgc_encrypted,64,DES_ENCRYPT|DES_HW); ! #else SUNOS4_FASTDES dessetkey(passwd); bcopy(lrp.logr_randnum, lcp.lgc_encrypted, sizeof(lcp.lgc_encrypted)); endes(lcp.lgc_encrypted); desdone(); /* clean up (not used except by login) */ #endif SUNOS4_FASTDES lcp.lgc_cmd = AFPLoginCont; lcp.lgc_zero = 0; *** lib/cap/abversion.c.orig Tue Apr 13 17:28:57 1993 --- lib/cap/abversion.c Tue Apr 13 18:17:18 1993 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1993/04/13 07:28:52 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abversion.c,v 2.32 1993/04/13 07:28:52 djh Rel djh $ ! * $Revision: 2.32 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1993/04/13 08:17:09 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abversion.c,v 2.33 1993/04/13 08:17:09 djh Rel djh $ ! * $Revision: 2.33 $ */ /* *************** *** 31,37 **** myversion.cv_name = "CAP"; myversion.cv_version = 6; myversion.cv_subversion = 0; ! myversion.cv_patchlevel = 132; myversion.cv_rmonth = "April"; myversion.cv_ryear = "1993"; switch (lap_proto) { --- 31,37 ---- myversion.cv_name = "CAP"; myversion.cv_version = 6; myversion.cv_subversion = 0; ! myversion.cv_patchlevel = 133; myversion.cv_rmonth = "April"; myversion.cv_ryear = "1993"; switch (lap_proto) { *** README.orig Tue Apr 13 17:29:43 1993 --- README Tue Apr 13 18:18:10 1993 *************** *** 2,8 **** CAP - Columbia AppleTalk Package for UNIX o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 132, April 1993 Notice ------ --- 2,8 ---- CAP - Columbia AppleTalk Package for UNIX o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 133, April 1993 Notice ------