diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index c3ab4a67..07a9fefc 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,10 @@ All changes to this project will be documented in this file. +## [10.1.8] - 2020-08-12 + +(ws) on macOS, with OpenSSL or MbedTLS, use /etc/ssl/cert.pem as the system certs + ## [10.1.7] - 2020-08-11 (ws) -q option imply info log level, not warning log level diff --git a/ixwebsocket/IXWebSocketVersion.h b/ixwebsocket/IXWebSocketVersion.h index 24022d3c..1e9d75d7 100644 --- a/ixwebsocket/IXWebSocketVersion.h +++ b/ixwebsocket/IXWebSocketVersion.h @@ -6,4 +6,4 @@ #pragma once -#define IX_WEBSOCKET_VERSION "10.1.7" +#define IX_WEBSOCKET_VERSION "10.1.8" diff --git a/ws/ws.cpp b/ws/ws.cpp index c3d630c4..240f4090 100644 --- a/ws/ws.cpp +++ b/ws/ws.cpp @@ -488,6 +488,16 @@ int main(int argc, char** argv) tlsOptions.caFile = "NONE"; } + if (tlsOptions.isUsingSystemDefaults()) + { +#ifdef __APPLE__ +#if defined(IXWEBSOCKET_USE_MBED_TLS) || defined(IXWEBSOCKET_USE_OPEN_SSL) + // We could try to load some system certs as well, but this is easy enough + tlsOptions.caFile = "/etc/ssl/cert.pem"; +#endif +#endif + } + if (!logfile.empty()) { try