Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No OPENSSL_Applink

2,081 views
Skip to first unread message

ope...@comaxis.com

unread,
Jun 7, 2014, 9:34:47 AM6/7/14
to
I am attempting to use the d2i_PKCS12_fp() API call in a Windows DLL
compiled with the multi-threaded (/MT) runtime library. On this call I
get the runtime error "OPENSSL_Uplink(03CE1000,08): no OPENSSL_Applink".
From discussions I have seen about this error, I thought I could fix it by
adding "applink.c" to my project, and calling CRYPTO_malloc_init().
However this has no effect. Is use of /MT causing this? It will be
difficult to change that, due to other components of the project. I have
used the HMAC and SHA256 APIs in this project with no problem. If it is
just file I/O causing the problem, is there a way that I can
read in the .p12 file myself, and just pass a buffer to OpenSSL in order
to initialize the PKCS12 structure?



______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openss...@openssl.org
Automated List Manager majo...@openssl.org

Dave Thompson

unread,
Jun 10, 2014, 2:07:41 AM6/10/14
to
> From: owner-ope...@openssl.org On Behalf Of ope...@comaxis.com
> Sent: Saturday, June 07, 2014 09:35

> I am attempting to use the d2i_PKCS12_fp() API call in a Windows DLL
> compiled with the multi-threaded (/MT) runtime library. On this call I
> get the runtime error "OPENSSL_Uplink(03CE1000,08): no
> OPENSSL_Applink".
> From discussions I have seen about this error, I thought I could fix it by
> adding "applink.c" to my project, and calling CRYPTO_malloc_init().
> However this has no effect. Is use of /MT causing this? It will be
> difficult to change that, due to other components of the project. I have

applink.c (and OpenSSL_Applink) only works in an EXE, not a DLL.

> used the HMAC and SHA256 APIs in this project with no problem. If it is
> just file I/O causing the problem, is there a way that I can
> read in the .p12 file myself, and just pass a buffer to OpenSSL in order
> to initialize the PKCS12 structure?
>
Yes, uplink is for file access (and malloc_init is for memory allocation).

You can:

- read the file contents into memory and call d2i_PKCS12 to parse from memory
(pass a temporary *copy* pointer because it gets changed, which isn't possible
for an array and is wrong for a malloc/etc pointer that you need to free later)

- call BIO_new_file to open the file *in OpenSSL NOT your code* and use d2i_PKCS12_bio.

pbkr...@gmail.com

unread,
Apr 24, 2015, 2:24:13 AM4/24/15
to
I have written a JNI layer code which uses the OpenSSL 1.0.2 a version RSA encrypt & decrypt functions. I generated a JniLayer.dll for this code in windows7- 64bit by including applink.c as mentioned in Openssl FAQs.

I am using the Openssl 1.0.2a precompiled binaries for windows 64bit Downloaded from Openssl.org website.

Whenever I tried to load JniLayer.dll from java, still I am getting Openssl_Uplink no Openssl_Applink error.

I also verified using the dependency walker tool & the JniLayer.dll contains symbol for Opensll_Applink.

Also I have written a C stub which creates a dll similar to JniLayer.dll & I am able to access the dll from another c program by linking statically at compile time . I am facing this Applink error in Java only.

Also is this an issue on Windows Only?


Appreciate any help in this regard.

Thanks & Regards,
Bharath P



On Tuesday, June 10, 2014 at 11:37:41 AM UTC+5:30, "Dave Thompson" wrote:
> > From:
0 new messages