Skip to content

Commit dcbafae

Browse files
committed
(ws) on macOS, with OpenSSL or MbedTLS, use /etc/ssl/cert.pem as the system certs
1 parent eb197ed commit dcbafae

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All changes to this project will be documented in this file.
44

5+
## [10.1.8] - 2020-08-12
6+
7+
(ws) on macOS, with OpenSSL or MbedTLS, use /etc/ssl/cert.pem as the system certs
8+
59
## [10.1.7] - 2020-08-11
610

711
(ws) -q option imply info log level, not warning log level

ixwebsocket/IXWebSocketVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
#pragma once
88

9-
#define IX_WEBSOCKET_VERSION "10.1.7"
9+
#define IX_WEBSOCKET_VERSION "10.1.8"

ws/ws.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,16 @@ int main(int argc, char** argv)
488488
tlsOptions.caFile = "NONE";
489489
}
490490

491+
if (tlsOptions.isUsingSystemDefaults())
492+
{
493+
#ifdef __APPLE__
494+
#if defined(IXWEBSOCKET_USE_MBED_TLS) || defined(IXWEBSOCKET_USE_OPEN_SSL)
495+
// We could try to load some system certs as well, but this is easy enough
496+
tlsOptions.caFile = "/etc/ssl/cert.pem";
497+
#endif
498+
#endif
499+
}
500+
491501
if (!logfile.empty())
492502
{
493503
try

0 commit comments

Comments
 (0)