(ws) on macOS, with OpenSSL or MbedTLS, use /etc/ssl/cert.pem as the system certs

This commit is contained in:
Benjamin Sergeant 2020-08-12 18:55:13 -07:00
parent eb197edcec
commit dcbafae35a
3 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -6,4 +6,4 @@
#pragma once
#define IX_WEBSOCKET_VERSION "10.1.7"
#define IX_WEBSOCKET_VERSION "10.1.8"

View File

@ -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