How does QSslSocket::supportsSsl know if it supports ssl or not?

You must know how to use QSslSocket::supportsSsl in your app to check if your Qt lib supports ssl. How does QSslSocket::supportsSsl decide if it supports ssl or not? The function searches some directories in order for the two openssl dlls: libeay32.dll and ssleay32.dll. If both files are found, it returns true meaning ssl is supported. Otherwise, it returns false meaning ssl is not supported. The search directories are (in order): the directory where your app resides; the system directory(C:\windows\system32); the directories in the PATH environment variable.

If you run your app in Qt Creator, you can find the PATH environment variable in the Projects/Run Settings. If you debug your app in Qt Creator, the debugger such as gdb will add additional directories such as (../opt/bin/ relative to where gdb.exe is) in the PATH environment variable. If you run your app outside Qt Creator, you can check the PATH environment variable in the system settings.

 

Did you like this?
Tip admin with Cryptocurrency

Donate Bitcoin to admin

Scan to Donate Bitcoin to admin
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to admin

Scan to Donate Bitcoin Cash to admin
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to admin

Scan to Donate Ethereum to admin
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to admin

Scan to Donate Litecoin to admin
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to admin

Scan to Donate Monero to admin
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to admin

Scan to Donate ZCash to admin
Scan the QR code or copy the address below into your wallet to send some ZCash:
Posted in

Leave a Reply