diff options
Diffstat (limited to 'src/lib/libcrypto/md4/md4_one.c')
| -rw-r--r-- | src/lib/libcrypto/md4/md4_one.c | 20 |
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 | |||
| 68 | unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md) | 64 | unsigned 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); |
