client confirm server hostname in cert
authorAndy Green <andy@warmcat.com>
Tue, 28 Jun 2016 11:50:40 +0000 (19:50 +0800)
committerAndy Green <andy@warmcat.com>
Thu, 14 Jul 2016 00:57:27 +0000 (08:57 +0800)
commite7bf0aa1dcaa73171ef300d36ae0b6c3cc5140da
tree1fa0377200ac37240d59ef66b66868b254eedf4a
parent6ff571f854a0181f041db687cd87c546cd4752f1
client confirm server hostname in cert

Openssl v1.0.2 and above have support for checking the hostname
the client side connected to against the hostname on the cert the
server presented.

This enables that feature if the necessary API is available in the
openssl version, meaning the connection will fail at ssl negotiation if the
cert isn't for the requested server

It's very easy to test, add a fake entry to /etc/hosts for the server IP with
a different name, using that will fail at ssl but using the correct dns name
matching the certificate will work.
CMakeLists.txt
lib/private-libwebsockets.h
lib/ssl-client.c
lws_config.h.in