File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,15 @@ POP_SYS_WARNINGS
34
34
#include " connection_tcpip_base.h"
35
35
36
36
37
+ static const char * tls_ciphers_list=" DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:"
38
+ " AES128-RMD:DES-CBC3-RMD:DHE-RSA-AES256-RMD:"
39
+ " DHE-RSA-AES128-RMD:DHE-RSA-DES-CBC3-RMD:"
40
+ " AES256-SHA:RC4-SHA:RC4-MD5:DES-CBC3-SHA:"
41
+ " DES-CBC-SHA:EDH-RSA-DES-CBC3-SHA:"
42
+ " EDH-RSA-DES-CBC-SHA:AES128-SHA:AES256-RMD:" ;
43
+ static const char * tls_cipher_blocked= " !aNULL:!eNULL:!EXPORT:!LOW:!MD5:!DES:!RC2:!RC4:!PSK:!SSLv3:" ;
44
+
45
+
37
46
static void throw_yassl_error_msg (const char * msg)
38
47
{
39
48
throw cdk::foundation::Error (cdk::foundation::cdkerrc::tls_error,
@@ -103,7 +112,7 @@ void connection_TLS_impl::do_connect()
103
112
104
113
try
105
114
{
106
- yaSSL::SSL_METHOD* method = yaSSL::TLSv1_client_method ();
115
+ yaSSL::SSL_METHOD* method = yaSSL::TLSv1_1_client_method ();
107
116
108
117
if (!method)
109
118
throw_yassl_error ();
@@ -112,6 +121,13 @@ void connection_TLS_impl::do_connect()
112
121
if (!m_tls_ctx)
113
122
throw_yassl_error ();
114
123
124
+
125
+ std::string cipher_list;
126
+ cipher_list.append (tls_cipher_blocked);
127
+ cipher_list.append (tls_ciphers_list);
128
+
129
+ SSL_CTX_set_cipher_list (m_tls_ctx, cipher_list.c_str ());
130
+
115
131
if (!m_options.get_ca ().empty () ||
116
132
!m_options.get_ca_path ().empty ())
117
133
{
You can’t perform that action at this time.
0 commit comments