OpenSSL with 1.7.2 on Windows 10

Report any problems with CopperSpice
Post Reply
aquilinaj
Posts: 7
Joined: Thu Dec 09 2021 12:56 pm

OpenSSL with 1.7.2 on Windows 10

Post 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

aquilinaj
Posts: 7
Joined: Thu Dec 09 2021 12:56 pm

Re: OpenSSL with 1.7.2 on Windows 10

Post 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

barbara
Posts: 300
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: OpenSSL with 1.7.2 on Windows 10

Post 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

ansel
Posts: 120
Joined: Fri Apr 10 2015 8:23 am

Re: OpenSSL with 1.7.2 on Windows 10

Post 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
Ansel Sermersheim
CopperSpice Cofounder

Post Reply