mbedtls and polarssl first part
authorAndy Green <andy@warmcat.com>
Mon, 28 Mar 2016 11:58:02 +0000 (19:58 +0800)
committerAndy Green <andy@warmcat.com>
Tue, 29 Mar 2016 13:49:18 +0000 (21:49 +0800)
commit1a3f17700e483ea5354bda3f35d513fa30734d47
tree60c5b6aab7bfabd0d0f0a1cfb75e0b93a0a33448
parentf632e449defa566aa79cc4b028e0a291ae0aa8ae
mbedtls and polarssl first part

polarssl is the old name for mbedtls.  Unfortunately the two are confused in eg,
Fedora.  For our purposes, polarssl or mbedtls < 2.0 has includes in
/usr/include/polarssl and polarssl_ apis and we call that "polarssl".

polarssl or mbedtls >=2.0 has includes in /usr/include/mbedtls and mbedtls_ apis,
we call that "mbedtls".

This has to be spelled out clearly because eg Fedora has a package "mbedtls" which
is 1.3.x and has the polarssl_ apis and include path.  We will deal with that as
"polarssl" despite the package name then.

This patch lets you use LWS_USE_POLARSSL or LWS_USE_MBEDTLS and set the include and
library path like this

cmake .. -DLWS_USE_POLARSSL=1 -DLWS_POLARSSL_INCLUDE_DIRS=/usr/include -DLWS_POLARSSL_LIBRARIES=/usr/lib64/libmbedtls.so.9

This patch adds the cmake support and adapts [private-]libwebsockets.h but doesn't
modify the apis in ssl[-*].c yet.

Signed-off-by: Andy Green <andy@warmcat.com>
CMakeLists.txt
lib/libwebsockets.h
lib/private-libwebsockets.h
lib/ssl-client.c
lib/ssl-server.c
lib/ssl.c
lws_config.h.in