summaryrefslogtreecommitdiffstats
path: root/crypto/bf
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bf')
-rw-r--r--crypto/bf/bftest.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/bf/bftest.c b/crypto/bf/bftest.c
index 80182c0a2f..5ff14b1512 100644
--- a/crypto/bf/bftest.c
+++ b/crypto/bf/bftest.c
@@ -72,6 +72,10 @@ int main(int argc, char *argv[])
#else
#include <openssl/blowfish.h>
+#ifdef CHARSET_EBCDIC
+#include <openssl/ebcdic.h>
+#endif
+
char *bf_key[2]={
"abcdefghijklmnopqrstuvwxyz",
"Who is John Galt?"
@@ -351,9 +355,16 @@ static int test(void)
unsigned char out[8];
BF_LONG len;
+#ifdef CHARSET_EBCDIC
+ ebcdic2ascii(cbc_data, cbc_data, strlen(cbc_data));
+#endif
+
printf("testing blowfish in raw ecb mode\n");
for (n=0; n<2; n++)
{
+#ifdef CHARSET_EBCDIC
+ ebcdic2ascii(bf_key[n], bf_key[n], strlen(bf_key[n]));
+#endif
BF_set_key(&key,strlen(bf_key[n]),(unsigned char *)bf_key[n]);
data[0]=bf_plain[n][0];