[PYTHON-CRYPTO] v0.16beta1 - win32 no OPENSSL_Applink fatal error

Larry Bugbee bugbee at MAC.COM
Wed Jun 7 11:38:14 CEST 2006


Hi All,

On Windows with MinGW, or on Windows without MinGW....

Is anyone else having fatal "no OPENSSL_Applink" run-time  
errors?  ...running any program that uses file I/O to load/save PEM  
files.  All the unit tests that don't do file I/O run successfully.   
And everything runs fine under MacOSX regardless of file I/O.

I didn't know this, but it seems OpenSSL now has a requirement you  
call OPENSSL_Applink() once and only once from main at the start of  
your program.

   from  http://www.openssl.org/support/faq.html#PROG2
     "you have to compile small C snippet with compiler and/or
     options of your choice. The snippet gets installed as
     <install-root>/include/openssl/applink.c and should be either
     added to your application project or simply #include-d  in one
     [and only one] of your application source files.  Failure to
     link this shim module into your application manifests itself
     as fatal "no OPENSSL_Applink" run-time error. An explicit
     reminder is due that in this situation [mixing compiler options]
     it is as important to add CRYPTO_malloc_init prior first
     call to OpenSSL."

   from openssl's INSTALL.W32
     If you link with OpenSSL .DLLs, then you're expected to include
     into your application code small "shim" snippet, which provides
     glue between OpenSSL BIO layer and your compiler run-time. Look
     up OPENSSL_Applink reference page for further details.

See also openssl's ms/applink.c

I've tried futzing with __m2crypto.i and __init__.py  NoGo.   
Suggestions?

Tx, Larry


-----Original Message-----
From: Heikki Toivonen [mailto:heikki at osafoundation.org]
Sent: Tuesday, June 06, 2006 11:22 AM
To: Bugbee, Larry
Subject: Re: MinGW

> Then I ran each of the test_XXX.py files.  Some worked.  Only these
> gave a "OPENSSL_Uplink(00D4A010,05): no OPENSSL_Applink" error.
>         'test_bio_file',
>         'test_dh',
>         'test_dsa',
>         'test_rsa',
>         'test_smime',
>         'test_x509'
>         'test_ecdh'
>         'test_ecdsa'

Hmm, I really have no idea. It's good that you got progress though. I
think now would be a time to post to the mailing list.



More information about the python-crypto mailing list