Re: 0C4 when calling OPENSSL function SHA1

2011-06-30 Thread Bernd Oppolzer

FYI:

the error simply was that the openssl package was compiled with the
RENT option, and my C main function was compiled with NORENT.
This has nothing to do with XPLINK, but because this was my first
experience with XPLINK, it took me some time to find out. And: in the
beginning I had no information about the compile options used to build
the openssl package.

When I changed my main function to RENT, everything ran fine.

Kind regards

Bernd



Am 29.06.2011 15:11, schrieb Bernd Oppolzer:

Dear colleagues,

I have to call the openssl package on z/OS to do some encryption work.
Now I built a C main function to call a routine which did run 
successfully

at another site. Because the openssl library uses XPLINK linkage, we
decided to do so, too. But when I first call a function from the 
openssl library,

it abends with S0C4, in the function prologue, as far as I can see, when
fetching another entry point from the stack (something like LM 
5,6,8(11) -

Reg 11 was copied from Reg 5 some instructions before). The content
of Reg 11 is in the 0x2xxx area instead of 0x2a20 area, as it
should be - much too low.

I guess I did something wrong when compiling my module and linking
the openssl functions to it - maybe one of you has a spontaneous idea,
what my error was?

There are no errors in the compile and linkage step.

Do I have to specify ENTRY CEESTART for main programs even
with XPLINK?

Kind regards

Bernd


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: 0C4 when calling OPENSSL function SHA1

2011-06-30 Thread Kirk Wolf
Bernd,

Glad that you resolved your problem.  These sorts of problems can be
extremely difficult.

I would mention that if you want to use SHA1 or Block Ciphers in
OpenSSL that they are expensive in terms of CPU usage.   If you use
IBM Ported Tools OpenSSH (which uses OpenSSL for all of its crypto),
you may notice this.

A much better alternative is to use the CPAC-F KIMD instruction for SHA-1.

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

PS  Our OpenSSH Accelerator for z/OS is in fact a tool that
replaces the OpenSSL modules in OpenSSH so that CPAC-F is
automatically used for SHA-x hashes and block Ciphers.   If you have
OpenSSL built on z/OS with XPLINK, you could actually use our tool to
install this in your version (after modifying the LINK JCL that we
ship).   For more information, see: http://dovetail.com/solutions.html



On Thu, Jun 30, 2011 at 4:23 AM, Bernd Oppolzer
bernd.oppol...@t-online.de wrote:
 FYI:

 the error simply was that the openssl package was compiled with the
 RENT option, and my C main function was compiled with NORENT.
 This has nothing to do with XPLINK, but because this was my first
 experience with XPLINK, it took me some time to find out. And: in the
 beginning I had no information about the compile options used to build
 the openssl package.

 When I changed my main function to RENT, everything ran fine.

 Kind regards

 Bernd



 Am 29.06.2011 15:11, schrieb Bernd Oppolzer:

 Dear colleagues,

 I have to call the openssl package on z/OS to do some encryption work.
 Now I built a C main function to call a routine which did run successfully
 at another site. Because the openssl library uses XPLINK linkage, we
 decided to do so, too. But when I first call a function from the openssl
 library,
 it abends with S0C4, in the function prologue, as far as I can see, when
 fetching another entry point from the stack (something like LM 5,6,8(11) -
 Reg 11 was copied from Reg 5 some instructions before). The content
 of Reg 11 is in the 0x2xxx area instead of 0x2a20 area, as it
 should be - much too low.

 I guess I did something wrong when compiling my module and linking
 the openssl functions to it - maybe one of you has a spontaneous idea,
 what my error was?

 There are no errors in the compile and linkage step.

 Do I have to specify ENTRY CEESTART for main programs even
 with XPLINK?

 Kind regards

 Bernd

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html