aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bf
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
committerUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
commita53955d8abd68c604de02cc1e101c66169207fb7 (patch)
treee51051484f2b073f7b58a1549442bf0657ca2978 /crypto/bf
parent9231f4779677a3cb95a4f8ccebd56432cb914498 (diff)
downloadopenssl-a53955d8abd68c604de02cc1e101c66169207fb7.tar.gz
Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
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];