summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/md4/md4_one.c
diff options
context:
space:
mode:
authorbeck <>2014-04-15 17:46:17 +0000
committerbeck <>2014-04-15 17:46:17 +0000
commit399901082925ad76fc2bd5cd8d351a590f3f2989 (patch)
treec53c25a15cd89988cef641fa18324c5c6db28fed /src/lib/libcrypto/md4/md4_one.c
parent132a4cce42485cfd13bf12c1213cf1a63b5b1da2 (diff)
downloadopenbsd-399901082925ad76fc2bd5cd8d351a590f3f2989.tar.gz
openbsd-399901082925ad76fc2bd5cd8d351a590f3f2989.tar.bz2
openbsd-399901082925ad76fc2bd5cd8d351a590f3f2989.zip
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.
Diffstat (limited to 'src/lib/libcrypto/md4/md4_one.c')
-rw-r--r--src/lib/libcrypto/md4/md4_one.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/lib/libcrypto/md4/md4_one.c b/src/lib/libcrypto/md4/md4_one.c
index bb64362638..ed6ce33650 100644
--- a/src/lib/libcrypto/md4/md4_one.c
+++ b/src/lib/libcrypto/md4/md4_one.c
@@ -61,10 +61,6 @@
61#include <openssl/md4.h> 61#include <openssl/md4.h>
62#include <openssl/crypto.h> 62#include <openssl/crypto.h>
63 63
64#ifdef CHARSET_EBCDIC
65#include <openssl/ebcdic.h>
66#endif
67
68unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md) 64unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md)
69 { 65 {
70 MD4_CTX c; 66 MD4_CTX c;
@@ -73,23 +69,7 @@ unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md)
73 if (md == NULL) md=m; 69 if (md == NULL) md=m;
74 if (!MD4_Init(&c)) 70 if (!MD4_Init(&c))
75 return NULL; 71 return NULL;
76#ifndef CHARSET_EBCDIC
77 MD4_Update(&c,d,n); 72 MD4_Update(&c,d,n);
78#else
79 {
80 char temp[1024];
81 unsigned long chunk;
82
83 while (n > 0)
84 {
85 chunk = (n > sizeof(temp)) ? sizeof(temp) : n;
86 ebcdic2ascii(temp, d, chunk);
87 MD4_Update(&c,temp,chunk);
88 n -= chunk;
89 d += chunk;
90 }
91 }
92#endif
93 MD4_Final(md,&c); 73 MD4_Final(md,&c);
94 OPENSSL_cleanse(&c,sizeof(c)); /* security consideration */ 74 OPENSSL_cleanse(&c,sizeof(c)); /* security consideration */
95 return(md); 75 return(md);