Hi all,

 

I’m writing an XML-RPC client call under a Tuxedo app on HP-UX 11 and having run-time troubles due to an Oracle .so being picked up instead of OpenSSL libraries.

 

My app statically links in the XML-RPC library, libcurl, libssl and libcrypto, but at run-time it seg-faults with the following trace:

 

#0  0xc000000002433570:0 in BN_div+0x120 ()

   from /u01/app/oracle/OraHome_1/lib/libnnz10.so

#1  0x40000000009f1e70:0 in BN_nnmod+0x30 ()

#2  0x40000000009f7de0:0 in S_BN_mod_inverse+0x300 ()

#3  0x40000000009ff2b0:0 in BN_MONT_CTX_set_locked+0x3d0 ()

#4  0x4000000000a19740:0 in RSA_eay_public_decrypt+0x440 ()

#5  0x400000000088a6f0:0 in RSA_public_decrypt+0x70 ()

#6  0x400000000088bfd0:0 in RSA_verify+0x130 ()

#7  0x40000000008d1380:0 in EVP_VerifyFinal+0x200 ()

#8  0x4000000000a45bb0:0 in ASN1_item_verify+0x190 ()

#9  0x40000000009479f0:0 in X509_verify+0x50 () #10 0x4000000000936f90:0 in internal_verify+0xab0 ()

#11 0x40000000009338e0:0 in X509_verify_cert+0xbd0 ()

#12 0x4000000000838a20:0 in ssl_verify_cert_chain+0x230 ()

#13 0x4000000000809460:0 in ssl3_connect+0x4ed0 ()

#14 0x40000000008301a0:0 in SSL_connect+0x90 ()

#15 0x4000000000824ab0:0 in ssl23_connect+0x1440 ()

#16 0x40000000008301a0:0 in SSL_connect+0x90 ()

#17 0x40000000007acbf0:0 in Curl_ossl_connect_step2 (conn=0x600000000070cf40,

    sockindex=0, timeout_ms=0x9fffffffffffcf10) at ssluse.c:1391

 

Actually the error was originally in BN_set_word but I renamed that, and then in BN_mod_inverse and I renamed that (to S_BN_mod_inverse as you can see above)…  The BN_ functions are being picked up from Oracle’s libnnz10.so instead of libcrypto.a which I’ve statically linked in.

 

At link time, $ORAHOME/lib is included with a –L flag, and it is required.  I’ve tried changing the order of libraries on the command line, and also tried “-a,archive_shared” flags on the linker to give static libs a higher preference than shared.  I’ve also tried temporarily removing $ORAHOME/lib from my SHLIB_PATH and LD_LIBRARY_PATH environment variables.  However, nothing I do seems to get around this problem.

 

Does anybody have an idea how I can link my app correctly to avoid this problem?   

 

Does Oracle use openSSL internally (and hence the conflict)?  Has anybody had troubles with this before?

 

If I can’t fix the linking, should I perform some preprocessor trickery to put the OpenSSL bn.h functions in some namespace, or would the Oracle/OpenSSL overlap be so great that this will be too hard and encompass more than just the functions in bn.h?

 

 

Any help or hints would be much appreciated,

 

cheers,

Daniel Young
Senior Software Engineer


 

 

Level 13, 175 Eagle Street
Brisbane QLD 4000
T. +61 7 3406 1939
F. +61 7 3406 1999
www.synyati.com.au

This email message and information contained in or attached to this message may be privileged, confidential, and protected from disclosure and is intended only for the person or entity to which it is addressed. Any review, retransmission, dissemination, printing or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this message in error, please immediately inform the sender by reply e-mail and delete the message and any attachments.

 

 

 

Reply via email to