summaryrefslogtreecommitdiffstats
path: root/crypto/bf
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-06-04 23:35:58 +0200
committerUlf Möller <ulf@openssl.org>1999-06-04 23:35:58 +0200
commita53955d8abd68c604de02cc1e101c66169207fb7 (patch)
treee51051484f2b073f7b58a1549442bf0657ca2978 /crypto/bf
parentGenerate no-xxx options for missing ciphers. (diff)
downloadopenssl-a53955d8abd68c604de02cc1e101c66169207fb7.tar.xz
openssl-a53955d8abd68c604de02cc1e101c66169207fb7.zip
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];