Add mbed tls version in user agent string + set user agent properly when enabling openssl on macOS

This commit is contained in:
Benjamin Sergeant 2019-10-01 15:58:35 -07:00
parent a0cfaff528
commit 95dd03b298

View File

@ -46,7 +46,9 @@
#endif #endif
// SSL // SSL
#if defined(IXWEBSOCKET_USE_OPEN_SSL) #ifdef IXWEBSOCKET_USE_MBED_TLS
#include <mbedtls/version.h>
#elif defined(IXWEBSOCKET_USE_OPEN_SSL)
#include <openssl/opensslv.h> #include <openssl/opensslv.h>
#endif #endif
@ -65,11 +67,11 @@ namespace ix
// TLS // TLS
#ifdef IXWEBSOCKET_USE_TLS #ifdef IXWEBSOCKET_USE_TLS
#ifdef IXWEBSOCKET_USE_MBED_TLS #ifdef IXWEBSOCKET_USE_MBED_TLS
ss << " ssl/mbedtls"; ss << " ssl/mbedtls " << MBEDTLS_VERSION_STRING;
#elif __APPLE__
ss << " ssl/DarwinSSL";
#elif defined(IXWEBSOCKET_USE_OPEN_SSL) #elif defined(IXWEBSOCKET_USE_OPEN_SSL)
ss << " ssl/OpenSSL " << OPENSSL_VERSION_TEXT; ss << " ssl/OpenSSL " << OPENSSL_VERSION_TEXT;
#elif __APPLE__
ss << " ssl/DarwinSSL";
#endif #endif
#else #else
ss << " nossl"; ss << " nossl";