diff options
author | Ulf Möller <ulf@openssl.org> | 1999-06-04 21:35:58 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-06-04 21:35:58 +0000 |
commit | a53955d8abd68c604de02cc1e101c66169207fb7 (patch) | |
tree | e51051484f2b073f7b58a1549442bf0657ca2978 /crypto/sha/sha1test.c | |
parent | 9231f4779677a3cb95a4f8ccebd56432cb914498 (diff) |
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/sha/sha1test.c')
-rw-r--r-- | crypto/sha/sha1test.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/sha/sha1test.c b/crypto/sha/sha1test.c index 6a34a9ae13..9400ad2a61 100644 --- a/crypto/sha/sha1test.c +++ b/crypto/sha/sha1test.c @@ -69,6 +69,10 @@ int main(int argc, char *argv[]) #else #include <openssl/sha.h> +#ifdef CHARSET_EBCDIC +#include <openssl/ebcdic.h> +#endif + #undef SHA_0 /* FIPS 180 */ #define SHA_1 /* FIPS 180-1 */ @@ -105,6 +109,11 @@ int main(int argc, char *argv[]) SHA_CTX c; unsigned char md[SHA_DIGEST_LENGTH]; +#ifdef CHARSET_EBCDIC + ebcdic2ascii(test[0], test[0], strlen(test[0])); + ebcdic2ascii(test[1], test[1], strlen(test[1])); +#endif + P=(unsigned char **)test; R=(unsigned char **)ret; i=1; @@ -125,6 +134,9 @@ int main(int argc, char *argv[]) } memset(buf,'a',1000); +#ifdef CHARSET_EBCDIC + ebcdic2ascii(buf, buf, 1000); +#endif /*CHARSET_EBCDIC*/ SHA1_Init(&c); for (i=0; i<1000; i++) SHA1_Update(&c,buf,1000); |