Add --tls option to pass to ws server command, to enable/disable tls

This commit is contained in:
Benjamin Sergeant
2019-10-01 13:54:46 -07:00
parent 22b4e6a8fb
commit d60f5de231
3 changed files with 10 additions and 1 deletions

View File

@ -270,7 +270,7 @@ namespace ix
// create socket
std::string errorMsg;
bool tls = false;
bool tls = _socketTLSOptions.tls;
auto socket = createSocket(tls, clientFd, errorMsg, _socketTLSOptions);
if (socket == nullptr)

View File

@ -18,15 +18,21 @@ namespace ix
// the certificate presented to peers
std::string certFile;
// the key used for signing/encryption
std::string keyFile;
// the ca certificate (or certificate bundle) file containing
// certificates to be trusted by peers; use 'SYSTEM' to
// leverage the system defaults, use 'NONE' to disable peer verification
std::string caFile = "SYSTEM";
// list of ciphers (rsa, etc...)
std::string ciphers = "DEFAULT";
// whether tls is enabled, used for server code
bool tls = false;
bool hasCertAndKey() const;
bool isUsingSystemDefaults() const;