summaryrefslogtreecommitdiffstats
path: root/crypto/mdc2/mdc2test.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/mdc2/mdc2test.c')
-rw-r--r--crypto/mdc2/mdc2test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/mdc2/mdc2test.c b/crypto/mdc2/mdc2test.c
index 6fc6c0ed00..0b1134bfe5 100644
--- a/crypto/mdc2/mdc2test.c
+++ b/crypto/mdc2/mdc2test.c
@@ -73,6 +73,10 @@ int main(int argc, char *argv[])
#else
#include <openssl/mdc2.h>
+#ifdef CHARSET_EBCDIC
+#include <openssl/ebcdic.h>
+#endif
+
static unsigned char pad1[16]={
0x42,0xE5,0x0C,0xD2,0x24,0xBA,0xCE,0xBA,
0x76,0x0B,0xDD,0x2B,0xD4,0x09,0x28,0x1A
@@ -91,6 +95,10 @@ int main(int argc, char *argv[])
MDC2_CTX c;
static char *text="Now is the time for all ";
+#ifdef CHARSET_EBCDIC
+ ebcdic2ascii(text,text,strlen(text));
+#endif
+
MDC2_Init(&c);
MDC2_Update(&c,(unsigned char *)text,strlen(text));
MDC2_Final(&(md[0]),&c);