summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/md5/md5_one.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/md5/md5_one.c')
-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);