Help with the 'export' declaration and OpenSSL?

Reid Levenick reid.levenick+dlang at gmail.com
Sat May 25 17:38:21 PDT 2013


I'm trying to use the OpenSSL bindings from Deimos, but whenever 
I try to use the PEM_write_X509 function (among others), OpenSSL 
gives a fatal error of "no OPENSSL_Applink", because in OpenSSL's 
ms/uplink.c, the function OPENSSL_Uplink calls GetProcAddress on 
the application with the string "OPENSSL_Applink".

So far I've tried

Writing a D version of applink.c: I can't get dmd to export my 
OPENSSL_Applink without a leading underscore.
and
Recompiling OpenSSL without -DOPENSSL_ENABLE_APPLINK: Converting 
libraries to OMF gives me a series of errors in dmd that give the 
impression that the functions from io.h or a similar file are not 
visible. I can't get any compile to work.

 From what I can tell, there are two possible solutions to my 
problem:

Export OPENSSL_Applink from my D program without a leading 
underscore.
or
Get a working compile of OpenSSL and then add an underscore in 
uplink.c before recompiling.

If anybody could help me with either of these (or suggest a third 
option) that would be fantastic.


More information about the Digitalmars-d mailing list