OS/390

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OS/390

Pierre Burlin
OS/390

Hi All,
I am trying to build openssl on OS/390 V1R5 but I am having problem with "make test".

I have tested 0.9.7e and 0.9.7i without any success, are there anyone with experience on OS/390 that could help me please?

The example below shows how I built openssl in open-mvs environment:
* Gunzip the openssl-0.9.7e.tar.gz file
* Ftp the file to target machine in binary mode.
* Convert the files into EBCDIC (pax –rf openssl-0.9.7e.tar -o to=IBM-1047,from=ISO8859-1).
* Export important paths:
        “export _C89_CCMODE=1”
        “export PATH=ÅPATH:/usr/local/bin/perl/bin”
        “export TMPDIR=/proteg”
        '“export PERLLIB=/usr/local/bin/perl/lib/perl5/5-6.1
* Run “Configure OS390-Unix”
* Edit the Makefile “CC= /proteg/secpro/openssl-0.9.7e/tools/c89.sh”
* Run "make" and evertyhing is built successfully.
* Run "make test" I get the errors (see below).

cfb64 idea ok
../util/shlib_wrap.sh ./shatest
CEE3204S The system detected a protection exception (System Completion Code=0C4)
.
         From entry point _openssl_ebcdic2ascii at compile unit offset +00000078
 at entry offset +00000078 at address
         1300A790.
FSUM8226 make: Error code 139
FSUM8226 make: Error code 255

But when I implemented the patch described in http://www.openldap.org/faq/data/cache/745.html I get:
error calculating MD4 on 'a'
got 9d16e62335fbfc2946dd98546d5ca3e6 instead of bde52cb31de33e46245e05fbdbd6fb24
error calculating MD4 on 'abc'
got 6c4e5574c289fe63e55f9b6e0c4df7b7 instead of a448017aaf21d8525fc10ae87aa6729d
error calculating MD4 on 'message digest'
got d35339c99cdb1a7066142b77718905f8 instead of d9130a8164549fe818874806e1c7014b
error calculating MD4 on 'abcdefghijklmnopqrstuvwxyz'
got 337b8432160246114f1194ee77d8d0b3 instead of d79e1c308aa5bbcdeea8ed63df412da9
error calculating MD4 on 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01
23456789'
got cec19c9121bb833f8cf6759a1f56862c instead of 043f8582f241db351ce627e153e7f0e4
error calculating MD4 on '123456789012345678901234567890123456789012345678901234
56789012345678901234567890'
got c6cc0b153597adcfa5a7b0790475b463 instead of e33b4ddc9c38f2199c3e7b164fcc0536
FSUM8226 make: Error code 6
FSUM8226 make: Error code 255

When looking at the source in .\crypto\md4\md4test.c
static char *test[]={
"",
"a",
"abc",
"message digest",
"abcdefghijklmnopqrstuvwxyz",
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
"12345678901234567890123456789012345678901234567890123456789012345678901234567890",
NULL,
};
Shouldn't it be in hex instead?

When look at md4test.c EVP_Digest() for the test.
int EVP_Digest(void *data, unsigned int count, unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl)
{
EVP_MD_CTX ctx;
int ret;
EVP_MD_CTX_init(&ctx);
EVP_MD_CTX_set_flags(&ctx,EVP_MD_CTX_FLAG_ONESHOT);
ret=EVP_DigestInit_ex(&ctx, type, impl) && EVP_DigestUpdate(&ctx, data, count) && EVP_DigestFinal_ex(&ctx, md, size);
EVP_MD_CTX_cleanup(&ctx);
return ret;
}
The question is where is ebcdic2ascii() called? Should it not be around EVP_DigestUpdate() as in md4_one.c?
If one looks at SHA1 and RIPEMD, ebcdic2ascii() is included in the test source (example: sha1test.c.). On the other hand they are missing in sha1_one.c, everything appearance to be a bit inconsistent?

Please help me!
Kind regards, Pierre


Reply | Threaded
Open this post in threaded view
|

RE: OS/390

mclellan_dave
OS/390
We are using OpenSSL 0.9.7d in our product on z/OS. when I last built and ran the tests, I believe tests ran successfully, but I might not be remembering properly.   z/OS was a last platform for OpenSSL exploitation, so we had a decent test program in our server application. 
 
Shall we go offlist for details?  (I saw your post on MVS-OE also).
 
Dave McLellan --Consulting Software Engineer - SPEA Engineering
EMC Corporation
228 South St. Mail Stop: 228 LL/AA-24
Hopkinton, MA 01748  USA
+1-508-249-1257 F: +1-508-497-8030  [hidden email]


From: [hidden email] [mailto:[hidden email]] On Behalf Of Pierre Burlin
Sent: Friday, January 27, 2006 8:30 AM
To: [hidden email]
Subject: OS/390

Hi All,
I am trying to build openssl on OS/390 V1R5 but I am having problem with "make test".

I have tested 0.9.7e and 0.9.7i without any success, are there anyone with experience on OS/390 that could help me please?

The example below shows how I built openssl in open-mvs environment:
* Gunzip the openssl-0.9.7e.tar.gz file
* Ftp the file to target machine in binary mode.
* Convert the files into EBCDIC (pax -rf openssl-0.9.7e.tar -o to=IBM-1047,from=ISO8859-1).
* Export important paths:
        "export _C89_CCMODE=1"
        "export PATH=ÅPATH:/usr/local/bin/perl/bin"
        "export TMPDIR=/proteg"
        '"export PERLLIB=/usr/local/bin/perl/lib/perl5/5-6.1
* Run "Configure OS390-Unix"
* Edit the Makefile "CC= /proteg/secpro/openssl-0.9.7e/tools/c89.sh"
* Run "make" and evertyhing is built successfully.
* Run "make test" I get the errors (see below).

cfb64 idea ok
../util/shlib_wrap.sh ./shatest
CEE3204S The system detected a protection exception (System Completion Code=0C4)
.
         From entry point _openssl_ebcdic2ascii at compile unit offset +00000078
 at entry offset +00000078 at address
         1300A790.
FSUM8226 make: Error code 139
FSUM8226 make: Error code 255

But when I implemented the patch described in http://www.openldap.org/faq/data/cache/745.html I get:
error calculating MD4 on 'a'
got 9d16e62335fbfc2946dd98546d5ca3e6 instead of bde52cb31de33e46245e05fbdbd6fb24
error calculating MD4 on 'abc'
got 6c4e5574c289fe63e55f9b6e0c4df7b7 instead of a448017aaf21d8525fc10ae87aa6729d
error calculating MD4 on 'message digest'
got d35339c99cdb1a7066142b77718905f8 instead of d9130a8164549fe818874806e1c7014b
error calculating MD4 on 'abcdefghijklmnopqrstuvwxyz'
got 337b8432160246114f1194ee77d8d0b3 instead of d79e1c308aa5bbcdeea8ed63df412da9
error calculating MD4 on 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01
23456789'
got cec19c9121bb833f8cf6759a1f56862c instead of 043f8582f241db351ce627e153e7f0e4
error calculating MD4 on '123456789012345678901234567890123456789012345678901234
56789012345678901234567890'
got c6cc0b153597adcfa5a7b0790475b463 instead of e33b4ddc9c38f2199c3e7b164fcc0536
FSUM8226 make: Error code 6
FSUM8226 make: Error code 255

When looking at the source in .\crypto\md4\md4test.c
static char *test[]={
"",
"a",
"abc",
"message digest",
"abcdefghijklmnopqrstuvwxyz",
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
"12345678901234567890123456789012345678901234567890123456789012345678901234567890",
NULL,
};
Shouldn't it be in hex instead?

When look at md4test.c EVP_Digest() for the test.
int EVP_Digest(void *data, unsigned int count, unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl)
{
EVP_MD_CTX ctx;
int ret;
EVP_MD_CTX_init(&ctx);
EVP_MD_CTX_set_flags(&ctx,EVP_MD_CTX_FLAG_ONESHOT);
ret=EVP_DigestInit_ex(&ctx, type, impl) && EVP_DigestUpdate(&ctx, data, count) && EVP_DigestFinal_ex(&ctx, md, size);
EVP_MD_CTX_cleanup(&ctx);
return ret;
}
The question is where is ebcdic2ascii() called? Should it not be around EVP_DigestUpdate() as in md4_one.c?
If one looks at SHA1 and RIPEMD, ebcdic2ascii() is included in the test source (example: sha1test.c.). On the other hand they are missing in sha1_one.c, everything appearance to be a bit inconsistent?

Please help me!
Kind regards, Pierre