Commit ca279453 authored by Ian Craggs's avatar Ian Craggs

Remove default value for ciphers in set_cipher_list #347

parent fb02e120
...@@ -513,7 +513,6 @@ void SSLSocket_terminate(void) ...@@ -513,7 +513,6 @@ void SSLSocket_terminate(void)
int SSLSocket_createContext(networkHandles* net, MQTTClient_SSLOptions* opts) int SSLSocket_createContext(networkHandles* net, MQTTClient_SSLOptions* opts)
{ {
int rc = 1; int rc = 1;
const char* ciphers = NULL;
FUNC_ENTRY; FUNC_ENTRY;
if (net->ctx == NULL) if (net->ctx == NULL)
...@@ -596,15 +595,13 @@ int SSLSocket_createContext(networkHandles* net, MQTTClient_SSLOptions* opts) ...@@ -596,15 +595,13 @@ int SSLSocket_createContext(networkHandles* net, MQTTClient_SSLOptions* opts)
goto free_ctx; goto free_ctx;
} }
if (opts->enabledCipherSuites == NULL) if (opts->enabledCipherSuites)
ciphers = "DEFAULT";
else
ciphers = opts->enabledCipherSuites;
if ((rc = SSL_CTX_set_cipher_list(net->ctx, ciphers)) != 1)
{ {
SSLSocket_error("SSL_CTX_set_cipher_list", NULL, net->socket, rc); if ((rc = SSL_CTX_set_cipher_list(net->ctx, opts->enabledCipherSuites)) != 1)
goto free_ctx; {
SSLSocket_error("SSL_CTX_set_cipher_list", NULL, net->socket, rc);
goto free_ctx;
}
} }
SSL_CTX_set_mode(net->ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); SSL_CTX_set_mode(net->ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment