=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/bdes/Attic/bdes.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/bdes/Attic/bdes.c 2003/06/10 22:20:45 1.11 --- src/usr.bin/bdes/Attic/bdes.c 2003/07/02 21:04:09 1.12 *************** *** 1,4 **** ! /* $OpenBSD: bdes.c,v 1.11 2003/06/10 22:20:45 deraadt Exp $ */ /* $NetBSD: bdes.c,v 1.2 1995/03/26 03:33:19 glass Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: bdes.c,v 1.12 2003/07/02 21:04:09 deraadt Exp $ */ /* $NetBSD: bdes.c,v 1.2 1995/03/26 03:33:19 glass Exp $ */ /*- *************** *** 47,53 **** #if 0 static char sccsid[] = "@(#)bdes.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: bdes.c,v 1.11 2003/06/10 22:20:45 deraadt Exp $"; #endif #endif /* not lint */ --- 47,53 ---- #if 0 static char sccsid[] = "@(#)bdes.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: bdes.c,v 1.12 2003/07/02 21:04:09 deraadt Exp $"; #endif #endif /* not lint */ *************** *** 90,96 **** #include typedef char Desbuf[8]; ! int tobinhexi(char, int); void cvtkey(char *, char *); int setbits(char *, int); void makekey(Desbuf); --- 90,96 ---- #include typedef char Desbuf[8]; ! int tobinhex(char, int); void cvtkey(char *, char *); int setbits(char *, int); void makekey(Desbuf); *************** *** 213,219 **** /* process the argument list */ kflag = 0; while ((i = getopt(argc, argv, "abdF:f:k:m:o:pv:")) != -1) ! switch(i) { case 'a': /* key is ASCII */ keybase = KEY_ASCII; break; --- 213,219 ---- /* process the argument list */ kflag = 0; while ((i = getopt(argc, argv, "abdF:f:k:m:o:pv:")) != -1) ! switch (i) { case 'a': /* key is ASCII */ keybase = KEY_ASCII; break; *************** *** 281,289 **** makekey(msgbuf); inverse = (alg == ALG_CBC || alg == ALG_ECB) && mode == MODE_DECRYPT; ! switch(alg) { case ALG_CBC: ! switch(mode) { case MODE_AUTHENTICATE: /* authenticate using CBC mode */ cbcauth(); break; --- 281,289 ---- makekey(msgbuf); inverse = (alg == ALG_CBC || alg == ALG_ECB) && mode == MODE_DECRYPT; ! switch (alg) { case ALG_CBC: ! switch (mode) { case MODE_AUTHENTICATE: /* authenticate using CBC mode */ cbcauth(); break; *************** *** 296,302 **** } break; case ALG_CFB: ! switch(mode) { case MODE_AUTHENTICATE: /* authenticate using CFB mode */ cfbauth(); break; --- 296,302 ---- } break; case ALG_CFB: ! switch (mode) { case MODE_AUTHENTICATE: /* authenticate using CFB mode */ cfbauth(); break; *************** *** 309,315 **** } break; case ALG_CFBA: ! switch(mode) { case MODE_AUTHENTICATE: /* authenticate using CFBA mode */ err(1, "can't authenticate with CFBA mode"); break; --- 309,315 ---- } break; case ALG_CFBA: ! switch (mode) { case MODE_AUTHENTICATE: /* authenticate using CFBA mode */ err(1, "can't authenticate with CFBA mode"); break; *************** *** 322,328 **** } break; case ALG_ECB: ! switch(mode) { case MODE_AUTHENTICATE: /* authenticate using ECB mode */ err(1, "can't authenticate with ECB mode"); break; --- 322,328 ---- } break; case ALG_ECB: ! switch (mode) { case MODE_AUTHENTICATE: /* authenticate using ECB mode */ err(1, "can't authenticate with ECB mode"); break; *************** *** 335,341 **** } break; case ALG_OFB: ! switch(mode) { case MODE_AUTHENTICATE: /* authenticate using OFB mode */ err(1, "can't authenticate with OFB mode"); break; --- 335,341 ---- } break; case ALG_OFB: ! switch (mode) { case MODE_AUTHENTICATE: /* authenticate using OFB mode */ err(1, "can't authenticate with OFB mode"); break; *************** *** 357,363 **** int tobinhex(char c, int radix) { ! switch(c) { case '0': return(0x0); case '1': return(0x1); case '2': return(radix > 2 ? 0x2 : -1); --- 357,363 ---- int tobinhex(char c, int radix) { ! switch (c) { case '0': return(0x0); case '1': return(0x1); case '2': return(radix > 2 ? 0x2 : -1); *************** *** 393,399 **** /* * just switch on the key base */ ! switch(keybase) { case KEY_ASCII: /* ASCII to integer */ (void)strncpy(obuf, ibuf, 8); return; --- 393,399 ---- /* * just switch on the key base */ ! switch (keybase) { case KEY_ASCII: /* ASCII to integer */ (void)strncpy(obuf, ibuf, 8); return;