summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/md5
diff options
context:
space:
mode:
authorbeck <>2014-04-15 17:46:17 +0000
committerbeck <>2014-04-15 17:46:17 +0000
commitc9414ed70ec89926c1041a64ee4b2f3ef36c90f6 (patch)
treec53c25a15cd89988cef641fa18324c5c6db28fed /src/lib/libcrypto/md5
parent0cfe49dc6db41fd2d4f960b618ed41b11ffffc6a (diff)
downloadopenbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.tar.gz
openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.tar.bz2
openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.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/md5')
-rw-r--r--src/lib/libcrypto/md5/md5_one.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/lib/libcrypto/md5/md5_one.c b/src/lib/libcrypto/md5/md5_one.c
index 43fee89379..839e27e972 100644
--- a/src/lib/libcrypto/md5/md5_one.c
+++ b/src/lib/libcrypto/md5/md5_one.c
@@ -61,10 +61,6 @@
61#include <openssl/md5.h> 61#include <openssl/md5.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 *MD5(const unsigned char *d, size_t n, unsigned char *md) 64unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md)
69 { 65 {
70 MD5_CTX c; 66 MD5_CTX c;
@@ -73,23 +69,7 @@ unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md)
73 if (md == NULL) md=m; 69 if (md == NULL) md=m;
74 if (!MD5_Init(&c)) 70 if (!MD5_Init(&c))
75 return NULL; 71 return NULL;
76#ifndef CHARSET_EBCDIC
77 MD5_Update(&c,d,n); 72 MD5_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 MD5_Update(&c,temp,chunk);
88 n -= chunk;
89 d += chunk;
90 }
91 }
92#endif
93 MD5_Final(md,&c); 73 MD5_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);