mirror of https://github.com/eclipse/paho.mqtt.c
Add OpenSSL version check for X509_check_host
This commit is contained in:
parent
18010d4438
commit
5446bdca1c
|
|
@ -674,6 +674,7 @@ int SSLSocket_connect(SSL* ssl, int sock, char* hostname, int verify)
|
|||
if (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE)
|
||||
rc = TCPSOCKET_INTERRUPTED;
|
||||
}
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x010002000) /* 1.0.2 and later */
|
||||
else if (verify == 1)
|
||||
{
|
||||
char* peername = NULL;
|
||||
|
|
@ -694,6 +695,7 @@ int SSLSocket_connect(SSL* ssl, int sock, char* hostname, int verify)
|
|||
if (addr != hostname)
|
||||
free(addr);
|
||||
}
|
||||
#endif
|
||||
|
||||
FUNC_EXIT_RC(rc);
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||
pwd
|
||||
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe"
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq libssl-dev
|
||||
sudo service mosquitto stop
|
||||
# Stop any mosquitto instance which may be still running from previous runs
|
||||
killall mosquitto
|
||||
|
|
|
|||
Loading…
Reference in New Issue