Update of /cvsroot/simplemail/simplemail
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31790
Modified Files:
configuration.h ssl.c
Log Message:
Added new configuration field for defining the cyphers for SSL connections.
Set the cyphers according to this field or take a default one, if it is NULL.
Index: configuration.h
===================================================================
RCS file: /cvsroot/simplemail/simplemail/configuration.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- configuration.h 23 Dec 2010 08:56:47 -0000 1.65
+++ configuration.h 23 Feb 2014 14:51:13 -0000 1.66
@@ -152,6 +152,7 @@
int dont_draw_alternating_rows; /* Disable the rendering of alternating rows */
int row_background; /* Row color */
int alt_row_background; /* Color of alternative row */
+ char *cypher_list; /* The cypher list used for ssl connections */
};
struct user
Index: ssl.c
===================================================================
RCS file: /cvsroot/simplemail/simplemail/ssl.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ssl.c 22 Feb 2014 12:05:35 -0000 1.3
+++ ssl.c 23 Feb 2014 14:51:13 -0000 1.4
@@ -28,6 +28,7 @@
#include <openssl/ssl.h>
#endif
+#include "configuration.h"
#include "ssl.h"
@@ -45,7 +46,13 @@
if ((ctx = SSL_CTX_new(SSLv23_client_method())))
{
+ const char *cypher_list = user.config.cypher_list;
+
+ if (!cypher_list)
+ cypher_list = "HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK@STRENGTH";
+
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
+ SSL_CTX_set_cipher_list(ctx, cypher_list);
if (SSL_CTX_set_default_verify_paths(ctx))
{
|