Page 1 of 1

OpenSSL with 1.7.2 on Windows 10

Posted: Thu Dec 09 2021 2:35 pm
by aquilinaj
I am trying to use OpenSSL with CopperSpice 1.7.2 on Windows 10. I have OpenSSL v1.1.1l 64-bit installed and I have built a C++ 64-bit application. Using Visual Studio 2019.

When I try to retrieve the OpenSSl version number using QSslSocket::sslLibraryVersionString(), it returns an empty string and when I try and use OpenSSL in my application I get a error code 21, "error creating SSL Context {}" error message.

Does anyone have any suggestions where I can look to see what the issue is?

regards,

John

Re: OpenSSL with 1.7.2 on Windows 10

Posted: Fri Dec 10 2021 3:07 pm
by aquilinaj
I resolved the issue. I stepped through the code for QSslSocket::sslLibraryVersionString in the debugger and it turns out that the CopperSpice tries to load certain name combinations for the OpenSSL DLLs and the installed DLLs on my system did not match. So by renaming the DLLs to one of the expected name combination, resolved the issue.

The dlls that get installed by the installer from OpenSSL organisation are libcrypto-1_1-x64.dll and libssl-1_1-x64.dll. The names expected by Copperspice 1.7.2 are: -

1) ssleay32.dll and libeay32.dll
2) libssl-10.dll and libcrypto-10.dll
3) libssl-8.dll and libcrypto-8.dll
4) libssl-7.dll and libcrypto-7.dll

Regards,

John

Re: OpenSSL with 1.7.2 on Windows 10

Posted: Fri Dec 10 2021 6:11 pm
by barbara
Thank you so much for debugging this problem! We will make a modification to the CsNetwork library to look for the DLL names for the OpenSSL version 1.1.x series. The file names are of the format "libssl-1_1-x64, libcrypto-1_1-x64" and "libssl-1_1, libcrypto-1_1".

Feel free to let us know about any other issues or questions you may have regarding CopperSpice.

Barbara

* Updated to include the file names

Re: OpenSSL with 1.7.2 on Windows 10

Posted: Mon Jan 03 2022 11:36 pm
by ansel
The changes have been applied on our development branch as a6c652d and are visible at the address below. The merge to the main branch will be pushed in the next few days. Thanks again for reporting this.

https://github.com/copperspice/copperspice/commit/a6c652d7bf3fbbfedc05e37010fe0e04a12a1803