-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*_it variables (ASN1_ITEM for builtin types) not accessible on Windows #350
Comments
Hi,
Also, you need to replace the include files order of ocsp.h and asn1t.h. With Visual Studio 2017, I could see this resolves the issue. |
Thank you for looking into this. I'm also using VS 2017, and editing the header as suggested by you fixed the issue for me.
|
Thanks for your confirmation. |
For what it's worth, OpenSSL has OPENSSL_EXTERN macro that expands to __declspec(dllimport) as necessary. It looks like it's been removed in LibreSSL very soon after the fork. libressl/openbsd@e2b579c#diff-5300baa69671290cb1254537e4699dc2 |
I'm thinking an addition on the affected headers like this:
Then a patch that does something like this to the *_it constants:
Is this still an issue if you build the dll's with msc to begin with (I suspect it is)? We stopped providing the pre-built DLLs due to other ABI incompatibilities between Visual Studio and MinGW64-produced binaries. |
(This issue was originally reported at https://bugs.ruby-lang.org/issues/13902)
When an application is compiled with cl.exe, it cannot access *_it variables properly (OCSP_BASICRESP_it in the example code below).
I can reproduce this with both libressl-2.2.9-windows.zip and libressl-2.5.5-windows.zip downloaded from https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/.
test.c:
I didn't dig further, but it looks like ASN1_item_i2d() is crashing because OCSP_BASICRESP_it points to garbage.
The text was updated successfully, but these errors were encountered: