diff options
Diffstat (limited to 'src/lib/libcrypto/md2')
| -rw-r--r-- | src/lib/libcrypto/md2/md2_one.c | 16 | ||||
| -rw-r--r-- | src/lib/libcrypto/md2/md2test.c | 4 |
2 files changed, 0 insertions, 20 deletions
diff --git a/src/lib/libcrypto/md2/md2_one.c b/src/lib/libcrypto/md2/md2_one.c index f7fef5cc0a..cb8594e085 100644 --- a/src/lib/libcrypto/md2/md2_one.c +++ b/src/lib/libcrypto/md2/md2_one.c | |||
| @@ -71,23 +71,7 @@ unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md) | |||
| 71 | if (md == NULL) md=m; | 71 | if (md == NULL) md=m; |
| 72 | if (!MD2_Init(&c)) | 72 | if (!MD2_Init(&c)) |
| 73 | return NULL; | 73 | return NULL; |
| 74 | #ifndef CHARSET_EBCDIC | ||
| 75 | MD2_Update(&c,d,n); | 74 | MD2_Update(&c,d,n); |
| 76 | #else | ||
| 77 | { | ||
| 78 | char temp[1024]; | ||
| 79 | unsigned long chunk; | ||
| 80 | |||
| 81 | while (n > 0) | ||
| 82 | { | ||
| 83 | chunk = (n > sizeof(temp)) ? sizeof(temp) : n; | ||
| 84 | ebcdic2ascii(temp, d, chunk); | ||
| 85 | MD2_Update(&c,temp,chunk); | ||
| 86 | n -= chunk; | ||
| 87 | d += chunk; | ||
| 88 | } | ||
| 89 | } | ||
| 90 | #endif | ||
| 91 | MD2_Final(md,&c); | 75 | MD2_Final(md,&c); |
| 92 | OPENSSL_cleanse(&c,sizeof(c)); /* Security consideration */ | 76 | OPENSSL_cleanse(&c,sizeof(c)); /* Security consideration */ |
| 93 | return(md); | 77 | return(md); |
diff --git a/src/lib/libcrypto/md2/md2test.c b/src/lib/libcrypto/md2/md2test.c index db5f5bc6d2..0195214036 100644 --- a/src/lib/libcrypto/md2/md2test.c +++ b/src/lib/libcrypto/md2/md2test.c | |||
| @@ -72,10 +72,6 @@ int main(int argc, char *argv[]) | |||
| 72 | #include <openssl/evp.h> | 72 | #include <openssl/evp.h> |
| 73 | #include <openssl/md2.h> | 73 | #include <openssl/md2.h> |
| 74 | 74 | ||
| 75 | #ifdef CHARSET_EBCDIC | ||
| 76 | #include <openssl/ebcdic.h> | ||
| 77 | #endif | ||
| 78 | |||
| 79 | static char *test[]={ | 75 | static char *test[]={ |
| 80 | "", | 76 | "", |
| 81 | "a", | 77 | "a", |
