>From: owner-openssl-us...@openssl.org On Behalf Of Perrow, Graeme >Sent: Monday, 12 August, 2013 10:51 >To: openssl-users@openssl.org >Subject: OPENSSL_Uplink: no OPENSSL_Applink
>On 32-bit Windows, I am seeing this error [investigating an error]. >I am building ... (OpenSSL 1.0.1e, OpenSSL FIPS 2.0.5), and I want >to load it from another DLL which is itself loaded from an application. >The application knows nothing about OpenSSL, only the DLL does. >I have seen the page http://www.openssl.org/support/faq.html#PROG2 >describing what needs to be done. I have tried linking applink.c into >my DLL, and I've tried #include'ing it from an existing source file >in the DLL. In both cases, I get the "no OPENSSL_Applink" message. The FAQ isn't totally clear that the "uplink" search looks only in the .exe, so the applink code must be in the .exe not any .dll. And if your .dll uses a different CRT setting than the .exe (or vice versa) the applink won't actually work. >The code I'm executing looks like: <snip> >I get the "no OPENSSL_Applink" message in the ERR_print_errors_fp() >call. Adding a call to CRYPTO_malloc_init above this changes nothing. applink redirects I/O calls, CRYPTO_malloc redirects memmgt calls. They may both be useful on Windows, but are not interchangeable. You should be able to get the error messages by creating a memBIO, or a fileBIO using file*name* not fp, and calling ERR_print_errors. Or alternatively call ERR_get_error, ERR_error_string, etc., to do the formatting and printing yourself, but that's more tedious. In general many applink uses (and errors) can be avoided by using only memory and file-name interfaces not fp interfaces. >I am not seeing this problem on 64-bit Windows, possibly because the >FIPS_mode_set(1) call succeeds there. >What am I missing? I need to solve this problem so I can solve the >original problem of why the FIPS_mode_set(1) call fails. Alternatively, >if you can help me solve that problem, I may not need to solve this one. :-) ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org