Our application (C++) is using libssl.so and libcrypto.so on Linux RHEL 6 for TLS 1.0 connection. The “.a” file corresponding to both “.so” file gets linked to our application. I am looking for both libssl.so and libcrypto.so and corresponding “.a” file so that our application uses TLS 1.2
Related
I am trying to use MQTT Poho C/C++ Client on Windows using Eclipse CDT and MinGW.
On Windows 10 I have installed Eclipse Neon and MinGW latest version with POSIX Thread Support.
Issue with MQTT Paho C++:
I have download the MQTT Paho Client C++ Source and also dependent C Library + headers
I have created a Eclipse CDT MinGW project and trying to build the sample application using C++ Paho
I am not able to build the code as I am getting compilation error for "std::mutex" 'mutex' is not a member of 'std', I tried to resolve it by googling but with no luck
As per one of the solutions I have also uninstalled MinGW which I have previously installed with pthread Win32 support and installed it again with pthread POSIX support.
I am also not able to find Paho C++ Pre-built libraries
Issue with MQTT Paho C Pre-built libraries:
I have download the Paho Pre-built C Library + headers for Windows
The zip file has .lib .dll .h and some samples
Again I have created a test project in Eclipse and included headers and libraries
Also configured the library path
It compiles correctly but linker hits the error and not able to find functions defined in .dll/.lib files
I checked rechecked everything but not sure about the issue
Do I need to use the DLL files provided with the library? I have not used them. I have tried to copy them in the Path and also in the same location as .lib but of no use
Also did google on how to use .dll with Eclipse CDT MinGW but no luck. :(
Let me know if anyone has tried to use Eclipse Paho C/C++ Source/Library With Windows Eclipse CDT MinGW.
Any possible solution to these issues will help.
At the beginning I want to tell you that I download libcurl from main site (i.e http://curl.haxx.se/download.html )
And version called:
Win64 2000/XP x86_64 zip 7.40.0 binary SSL SSH Edward LoPinto
I'm working on MSVC 2013 ultimate x64
Okey, this package seems to have SSL support (it contains ssl libs )
Program compiling fine, but when i try to run some https site I have got:
Protocol "https" not supported or disabled in libcurl.
I think that it is disabled (because this package contains ssl support).
Question is:
How to enable SSL support in libcurl ?
I solve my problem by compiling libcurl on my own hand.
It may help other people:
MSVC 2013 - 64 bit - 7.41.0 + OPENSSL
download
scan
Qt requires open ssl libraries to be installed on system. In debian / ubuntu when I install open ssl using apt everything works. But when I compile my application in windows, SSL features are not available I can verify this by executing
QSslSocket::supportsSsl()
How do I make it work in windows? I downloaded and installed open ssl from http://www.slproweb.com/products/Win32OpenSSL.html but it still returns false.
So after long time I figured what the problem is:
These 2 libraries need to be in same folder as your executable OR in windows system folder (system32 I think):
libeay32.dll
ssleay32.dll
You will find them in \bin of your OpenSSL folder, since I copied these 2 libs there it works
IMPORTANT: When deploying to client computers, it's also necessary to install vcredist package that was used to compile these .dll which may differ from vcredist package needed to run the application itself. vcredist version depends on version of the libraries.
You have to add OpenSSL lib in your project. In windows Qt doesn't come with OpenSSL lib. (I think it's a legal issue). You can find OpenSSL developer libs in URI you posted. If you are compiling against 32bit framework, what you need to download is Win32 OpenSSL v1.0.1e
This is what I have in my project.
QT += core gui network
win32{
LIBS += -LC:/OpenSSL-Win32/lib -lubsec
INCLUDEPATH += C:/OpenSSL-Win32/include
}
As you figured out already, you were missing dlls. Here is more information
Check what version of ssl you need with
QSslSocket::sslLibraryBuildVersionString();
For ssl 1.0.x (qt<5.12.4) you are likely missing libeay32.dll and ssleay32.dll.
For ssl 1.1.x (qt>=5.12.4) binary compatibility broke (qt 5.12.4 released), so you might need libssl-1_1.dll and libcrypto-1_1.dll, and its dependencies capi.dll and dasync.dll.
I tried everything mentioned in this Question
but nothing worked.
The binary works fine on Windows 64-bit, but almost always shows the error
Error Creating SSL Context()
on Windows 32-bit. I tried the demo http client example.
At last, I found the solution. I was downloading dll's from a dll website. You need to take these libraries
- libeay32.dll
- libssl32.dll
- ssleay32.dll
from this website here Win32 OpenSSL v1.0.2 file for 32 bit if you are using MSVC++ compiler
After installation of the above binary, copy the above three dll's in the the directory containing your binary file.
I recommend this source for OpenSSL Windows binaries. These binaries have no external dependencies and tested with 32-bit and 64-bit Qt5.
Update: OpenSSL 1.0 and 1.1 are not binary- and API-compatible. As of Qt 5.12 (certainly 5.12.4) version 1.1 seems the default OpenSSL backend in Qt, although I hear it can be configured to keep using 1.0.
I'm testing this source for Windows OpenSSL 1.1 builds, no problems so far: https://bintray.com/vszakats/generic/openssl
I am writing both a software to have windows and mac version. The program need ssl socket communication. How I can create a openssl shared library between mac and windows. And make the program can run in a machine which doesn't have openssl install on it
You need to compile openssl library both on Mac and Windows, and link the static library (.lib for Windows and .a for Mac) into your executable respectively.