From c9414ed70ec89926c1041a64ee4b2f3ef36c90f6 Mon Sep 17 00:00:00 2001 From: beck <> Date: Tue, 15 Apr 2014 17:46:17 +0000 Subject: Send the rotIBM stream cipher (ebcdic) to Valhalla to party for eternity with the bearded ones... some API's that nobody should be using will dissapear with this commit. --- src/lib/libssl/src/crypto/des/fcrypt.c | 46 ---------------------------------- 1 file changed, 46 deletions(-) (limited to 'src/lib/libssl/src/crypto/des/fcrypt.c') diff --git a/src/lib/libssl/src/crypto/des/fcrypt.c b/src/lib/libssl/src/crypto/des/fcrypt.c index ccbdff250f..d02189b290 100644 --- a/src/lib/libssl/src/crypto/des/fcrypt.c +++ b/src/lib/libssl/src/crypto/des/fcrypt.c @@ -1,13 +1,5 @@ /* NOCW */ #include -#ifdef _OSD_POSIX -#ifndef CHARSET_EBCDIC -#define CHARSET_EBCDIC 1 -#endif -#endif -#ifdef CHARSET_EBCDIC -#include -#endif /* This version of crypt has been developed from my MIT compatible * DES library. @@ -62,37 +54,7 @@ char *DES_crypt(const char *buf, const char *salt) { static char buff[14]; -#ifndef CHARSET_EBCDIC return(DES_fcrypt(buf,salt,buff)); -#else - char e_salt[2+1]; - char e_buf[32+1]; /* replace 32 by 8 ? */ - char *ret; - - /* Copy at most 2 chars of salt */ - if ((e_salt[0] = salt[0]) != '\0') - e_salt[1] = salt[1]; - - /* Copy at most 32 chars of password */ - strncpy (e_buf, buf, sizeof(e_buf)); - - /* Make sure we have a delimiter */ - e_salt[sizeof(e_salt)-1] = e_buf[sizeof(e_buf)-1] = '\0'; - - /* Convert the e_salt to ASCII, as that's what DES_fcrypt works on */ - ebcdic2ascii(e_salt, e_salt, sizeof e_salt); - - /* Convert the cleartext password to ASCII */ - ebcdic2ascii(e_buf, e_buf, sizeof e_buf); - - /* Encrypt it (from/to ASCII) */ - ret = DES_fcrypt(e_buf,e_salt,buff); - - /* Convert the result back to EBCDIC */ - ascii2ebcdic(ret, ret, strlen(ret)); - - return ret; -#endif } @@ -115,18 +77,10 @@ char *DES_fcrypt(const char *buf, const char *salt, char *ret) * crypt to "*". This was found when replacing the crypt in * our shared libraries. People found that the disabled * accounts effectively had no passwd :-(. */ -#ifndef CHARSET_EBCDIC x=ret[0]=((salt[0] == '\0')?'A':salt[0]); Eswap0=con_salt[x]<<2; x=ret[1]=((salt[1] == '\0')?'A':salt[1]); Eswap1=con_salt[x]<<6; -#else - x=ret[0]=((salt[0] == '\0')?os_toascii['A']:salt[0]); - Eswap0=con_salt[x]<<2; - x=ret[1]=((salt[1] == '\0')?os_toascii['A']:salt[1]); - Eswap1=con_salt[x]<<6; -#endif - /* EAY r=strlen(buf); r=(r+7)/8; -- cgit v1.2.3-55-g6feb