Commit 5446bdca authored by Ian Craggs's avatar Ian Craggs

Add OpenSSL version check for X509_check_host

parent 18010d44
...@@ -674,6 +674,7 @@ int SSLSocket_connect(SSL* ssl, int sock, char* hostname, int verify) ...@@ -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) if (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE)
rc = TCPSOCKET_INTERRUPTED; rc = TCPSOCKET_INTERRUPTED;
} }
#if (OPENSSL_VERSION_NUMBER >= 0x010002000) /* 1.0.2 and later */
else if (verify == 1) else if (verify == 1)
{ {
char* peername = NULL; char* peername = NULL;
...@@ -694,6 +695,7 @@ int SSLSocket_connect(SSL* ssl, int sock, char* hostname, int verify) ...@@ -694,6 +695,7 @@ int SSLSocket_connect(SSL* ssl, int sock, char* hostname, int verify)
if (addr != hostname) if (addr != hostname)
free(addr); free(addr);
} }
#endif
FUNC_EXIT_RC(rc); FUNC_EXIT_RC(rc);
return rc; return rc;
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TRAVIS_OS_NAME" == "linux" ]; then
pwd 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 sudo service mosquitto stop
# Stop any mosquitto instance which may be still running from previous runs # Stop any mosquitto instance which may be still running from previous runs
killall mosquitto killall mosquitto
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment