You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(65) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(61) |
Feb
(111) |
Mar
(98) |
Apr
(33) |
May
(31) |
Jun
(64) |
Jul
(35) |
Aug
(50) |
Sep
(170) |
Oct
(89) |
Nov
(72) |
Dec
(214) |
2002 |
Jan
(74) |
Feb
(21) |
Mar
(5) |
Apr
(4) |
May
(61) |
Jun
(13) |
Jul
(3) |
Aug
(39) |
Sep
(14) |
Oct
(80) |
Nov
(22) |
Dec
(76) |
2003 |
Jan
(14) |
Feb
(59) |
Mar
(7) |
Apr
(5) |
May
|
Jun
(4) |
Jul
(6) |
Aug
(78) |
Sep
(68) |
Oct
(23) |
Nov
(25) |
Dec
(107) |
2004 |
Jan
(82) |
Feb
(75) |
Mar
(13) |
Apr
(9) |
May
(21) |
Jun
(2) |
Jul
(1) |
Aug
(52) |
Sep
(23) |
Oct
(15) |
Nov
(6) |
Dec
(60) |
2005 |
Jan
(125) |
Feb
(94) |
Mar
(32) |
Apr
(68) |
May
|
Jun
|
Jul
(11) |
Aug
(3) |
Sep
(15) |
Oct
(3) |
Nov
|
Dec
(58) |
2006 |
Jan
(46) |
Feb
(29) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(9) |
Dec
(9) |
2007 |
Jan
(62) |
Feb
(60) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(6) |
Aug
(3) |
Sep
(4) |
Oct
(2) |
Nov
(4) |
Dec
(46) |
2008 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(10) |
Dec
(49) |
2009 |
Jan
(14) |
Feb
(12) |
Mar
(37) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(25) |
Oct
(48) |
Nov
(7) |
Dec
(45) |
2010 |
Jan
(15) |
Feb
(14) |
Mar
(7) |
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(28) |
Nov
|
Dec
(44) |
2011 |
Jan
(22) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(70) |
2012 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(128) |
2013 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
(150) |
2014 |
Jan
(70) |
Feb
(44) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sebastian B. <sb...@us...> - 2014-02-23 14:52:52
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31953 Modified Files: configuration.c Log Message: Write out the cypher list if it is set. Index: configuration.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/configuration.c,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- configuration.c 23 Feb 2014 14:52:27 -0000 1.104 +++ configuration.c 23 Feb 2014 14:52:50 -0000 1.105 @@ -846,6 +846,8 @@ if (user.config.alt_row_background != ALT_ROW_BACKGROUND) fprintf(fh,"Hidden.AltRowBackground=0x%x\n",user.config.alt_row_background); } + if (user.config.ssl_cypher_list) + fprintf(fh,"Hidden.SSLCypherList=%s\n",user.config.ssl_cypher_list); fclose(fh); } |
From: Sebastian B. <sb...@us...> - 2014-02-23 14:52:29
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31927 Modified Files: configuration.c configuration.h ssl.c Log Message: Renamed field cypher_list to ssl_cypher_list. Index: configuration.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/configuration.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- configuration.c 23 Feb 2014 14:52:06 -0000 1.103 +++ configuration.c 23 Feb 2014 14:52:27 -0000 1.104 @@ -185,7 +185,7 @@ user.config.dont_draw_alternating_rows = 0; user.config.row_background = ROW_BACKGROUND; /* Row color */ user.config.alt_row_background = ALT_ROW_BACKGROUND; /* Color of alternative row */ - user.config.cypher_list = NULL; + user.config.ssl_cypher_list = NULL; return 1; } @@ -211,7 +211,7 @@ free(user.config.receive_arexx_file); free(user.config.read_propfont); free(user.config.read_fixedfont); - free(user.config.cypher_list); + free(user.config.ssl_cypher_list); array_free(user.config.header_array); array_free(user.config.internet_emails); array_free(user.config.spam_white_emails); @@ -400,10 +400,10 @@ user.config.row_background = strtoul(result,NULL,0); if ((result = get_config_item(buf,"Hidden.AltRowBackground"))) user.config.alt_row_background = strtoul(result,NULL,0); - if ((result = get_config_item(buf,"Hidden.CypherList"))) + if ((result = get_config_item(buf,"Hidden.SSLCypherList"))) { - free(user.config.cypher_list); - user.config.cypher_list = mystrdup(result); + free(user.config.ssl_cypher_list); + user.config.ssl_cypher_list = mystrdup(result); } if (!mystrnicmp(buf, "ACCOUNT",7)) Index: configuration.h =================================================================== RCS file: /cvsroot/simplemail/simplemail/configuration.h,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- configuration.h 23 Feb 2014 14:51:13 -0000 1.66 +++ configuration.h 23 Feb 2014 14:52:27 -0000 1.67 @@ -152,7 +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 */ + char *ssl_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.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ssl.c 23 Feb 2014 14:51:48 -0000 1.6 +++ ssl.c 23 Feb 2014 14:52:27 -0000 1.7 @@ -47,7 +47,7 @@ if ((ctx = SSL_CTX_new(SSLv23_client_method()))) { - const char *cypher_list = user.config.cypher_list; + const char *cypher_list = user.config.ssl_cypher_list; if (!cypher_list) cypher_list = "HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK@STRENGTH"; |
From: Sebastian B. <sb...@us...> - 2014-02-23 14:52:08
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31903 Modified Files: configuration.c Log Message: Now reads the cypher list from the config file if specified. Index: configuration.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/configuration.c,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- configuration.c 26 Dec 2013 15:29:45 -0000 1.102 +++ configuration.c 23 Feb 2014 14:52:06 -0000 1.103 @@ -185,6 +185,7 @@ user.config.dont_draw_alternating_rows = 0; user.config.row_background = ROW_BACKGROUND; /* Row color */ user.config.alt_row_background = ALT_ROW_BACKGROUND; /* Color of alternative row */ + user.config.cypher_list = NULL; return 1; } @@ -210,6 +211,7 @@ free(user.config.receive_arexx_file); free(user.config.read_propfont); free(user.config.read_fixedfont); + free(user.config.cypher_list); array_free(user.config.header_array); array_free(user.config.internet_emails); array_free(user.config.spam_white_emails); @@ -398,6 +400,11 @@ user.config.row_background = strtoul(result,NULL,0); if ((result = get_config_item(buf,"Hidden.AltRowBackground"))) user.config.alt_row_background = strtoul(result,NULL,0); + if ((result = get_config_item(buf,"Hidden.CypherList"))) + { + free(user.config.cypher_list); + user.config.cypher_list = mystrdup(result); + } if (!mystrnicmp(buf, "ACCOUNT",7)) { |
From: Sebastian B. <sb...@us...> - 2014-02-23 14:51:51
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31856 Modified Files: ssl.c Log Message: Fixed typo in the doc. Index: ssl.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/ssl.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ssl.c 23 Feb 2014 14:51:31 -0000 1.5 +++ ssl.c 23 Feb 2014 14:51:48 -0000 1.6 @@ -34,7 +34,7 @@ /** - * Initialize ssl and return the orimary context. + * Initialize ssl and return the primary context. * * @return */ |
From: Sebastian B. <sb...@us...> - 2014-02-23 14:51:33
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31818 Modified Files: ssl.c Log Message: Check the result of SSL_CTX_set_cipher_list(). Index: ssl.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/ssl.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ssl.c 23 Feb 2014 14:51:13 -0000 1.4 +++ ssl.c 23 Feb 2014 14:51:31 -0000 1.5 @@ -29,6 +29,7 @@ #endif #include "configuration.h" +#include "debug.h" #include "ssl.h" @@ -52,11 +53,15 @@ 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)) + if (SSL_CTX_set_cipher_list(ctx, cypher_list)) { - return ctx; + if (SSL_CTX_set_default_verify_paths(ctx)) + { + return ctx; + } + } else + { + SM_DEBUGF(5,("SSL_CTX_set_cipher_list() failed.")); } } return NULL; |
From: Sebastian B. <sb...@us...> - 2014-02-23 14:51:16
|
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)) { |
From: Sebastian B. <sb...@us...> - 2014-02-23 13:26:15
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24598 Modified Files: tcp.c Log Message: Display common name of issuer and subject. Index: tcp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- tcp.c 23 Feb 2014 13:23:24 -0000 1.60 +++ tcp.c 23 Feb 2014 13:26:13 -0000 1.61 @@ -297,6 +297,9 @@ unsigned int sha1_size; unsigned char sha1[EVP_MAX_MD_SIZE]; char sha1_ascii[EVP_MAX_MD_SIZE*3+1]; + char issuer_common_name[40]; + char subject_common_name[40]; + char cert_summary[120]; long verify_results; X509_digest(server_cert, EVP_sha1(), sha1, &sha1_size); @@ -305,12 +308,22 @@ sm_snprintf(&sha1_ascii[i*3], 4, "%02X ", sha1[i]); sha1_ascii[sha1_size*3] = 0; + /* Issued to */ + if (X509_NAME_get_text_by_NID(X509_get_subject_name(server_cert), NID_commonName, subject_common_name, sizeof(subject_common_name)) < 0) + strcpy(subject_common_name, _("Not found")); + + /* Issued by */ + if (X509_NAME_get_text_by_NID(X509_get_issuer_name(server_cert), NID_commonName, issuer_common_name, sizeof(issuer_common_name)) < 0) + strcpy(issuer_common_name, _("Not found")); + + sm_snprintf(cert_summary, sizeof(cert_summary), "Issued to: %s (CN)\nIssues by: %s (CN)", subject_common_name, issuer_common_name); + verify_results = SSL_get_verify_result(conn->ssl); /* TODO: Use callbacks for proper decoupling */ - rc = thread_call_function_sync(thread_get_main(), sm_request, 5, - NULL, _("Failed to verify server certificate:\n%s\n\nSHA1: %s"), _("Connect anyway|Abort"), - X509_verify_cert_error_string(verify_results), sha1_ascii); + rc = thread_call_function_sync(thread_get_main(), sm_request, 6, + NULL, _("Failed to verify server certificate:\n%s\n\n%s\nSHA1: %s"), _("Connect anyway|Abort"), + X509_verify_cert_error_string(verify_results), cert_summary, sha1_ascii); /* Add some checks here */ X509_free(server_cert); |
From: Sebastian B. <sb...@us...> - 2014-02-23 13:25:58
|
Update of /cvsroot/simplemail/simplemail/gtk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24549/gtk Modified Files: support.c Log Message: Print the text when not compiling with GTK. Index: support.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/gtk/support.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- support.c 24 Dec 2013 09:31:38 -0000 1.16 +++ support.c 23 Feb 2014 13:25:55 -0000 1.17 @@ -348,6 +348,19 @@ return rc; #else + va_list ap; + char *text_buf; + + if (!(text_buf = malloc(2048))) + return 0; + + va_start(ap, gadgets); + vsnprintf(text_buf, 2048, text, ap); + va_end(ap); + + printf("%s\n", text_buf); + + free(text_buf); return 0; #endif } |
From: Sebastian B. <sb...@us...> - 2014-02-23 13:25:39
|
Update of /cvsroot/simplemail/simplemail/gtk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24525/gtk Modified Files: subthreads.c Log Message: Parameter argcount is inclusive. Index: subthreads.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/gtk/subthreads.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- subthreads.c 23 Feb 2014 13:23:44 -0000 1.63 +++ subthreads.c 23 Feb 2014 13:25:37 -0000 1.64 @@ -346,7 +346,7 @@ SM_ENTER; SM_DEBUGF(20,("Thread %p calls on context for %p\n", thread_get(), thread)); - assert(argcount < THREAD_CALL_FUNCTION_SYNC_DATA_NUM_ARGS); + assert(argcount <= THREAD_CALL_FUNCTION_SYNC_DATA_NUM_ARGS); data.function = (int (*)(void))function; data.argcount = argcount; |
From: Sebastian B. <sb...@us...> - 2014-02-23 13:23:46
|
Update of /cvsroot/simplemail/simplemail/gtk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24366/gtk Modified Files: subthreads.c Log Message: Function thread_call_function_sync() should return the value of the called function. Index: subthreads.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/gtk/subthreads.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- subthreads.c 19 Jan 2014 18:55:50 -0000 1.62 +++ subthreads.c 23 Feb 2014 13:23:44 -0000 1.63 @@ -370,13 +370,14 @@ int thread_call_function_sync(thread_t thread, void *function, int argcount, ...) { int rc; + uintptr_t function_rc; va_list argptr; va_start(argptr,argcount); - rc = thread_call_function_sync_v(thread, NULL, function, argcount, argptr); + rc = thread_call_function_sync_v(thread, &function_rc, function, argcount, argptr); va_end(argptr); - return rc; + return function_rc; } /***************************************************************************************/ |
From: Sebastian B. <sb...@us...> - 2014-02-23 13:23:26
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24336 Modified Files: tcp.c Log Message: Also display the SSL error message of the last verification failure.. Index: tcp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- tcp.c 23 Feb 2014 13:23:04 -0000 1.59 +++ tcp.c 23 Feb 2014 13:23:24 -0000 1.60 @@ -297,6 +297,7 @@ unsigned int sha1_size; unsigned char sha1[EVP_MAX_MD_SIZE]; char sha1_ascii[EVP_MAX_MD_SIZE*3+1]; + long verify_results; X509_digest(server_cert, EVP_sha1(), sha1, &sha1_size); @@ -304,8 +305,12 @@ sm_snprintf(&sha1_ascii[i*3], 4, "%02X ", sha1[i]); sha1_ascii[sha1_size*3] = 0; + verify_results = SSL_get_verify_result(conn->ssl); + /* TODO: Use callbacks for proper decoupling */ - rc = thread_call_function_sync(thread_get_main(), sm_request, 4, NULL, _("Certificate verification error\n\nSHA1: %s"), _("Connect anyway|Abort"), sha1_ascii); + rc = thread_call_function_sync(thread_get_main(), sm_request, 5, + NULL, _("Failed to verify server certificate:\n%s\n\nSHA1: %s"), _("Connect anyway|Abort"), + X509_verify_cert_error_string(verify_results), sha1_ascii); /* Add some checks here */ X509_free(server_cert); |
From: Sebastian B. <sb...@us...> - 2014-02-23 13:23:06
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24285 Modified Files: tcp.c Log Message: The user can now decide if connection should be continued if cert check failed. Index: tcp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- tcp.c 23 Feb 2014 13:21:54 -0000 1.58 +++ tcp.c 23 Feb 2014 13:23:04 -0000 1.59 @@ -53,6 +53,7 @@ #include "smintl.h" #include "tcp.h" +#include "subthreads.h" #include "support.h" #define MIN(a,b) (((a)<(b))?(a):(b)) @@ -249,6 +250,7 @@ SSL *ssl = X509_STORE_CTX_get_ex_data(x509_ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); int *failed = SSL_get_app_data(ssl); *failed = 1; + preverify_ok = 1; } return preverify_ok; } @@ -282,13 +284,37 @@ if ((rc = SSL_connect(conn->ssl)) >= 0) { X509 *server_cert; + + if (!failed) + { + SM_DEBUGF(5,("Connection is secure\n")); + return 1; + } + if ((server_cert = SSL_get_peer_certificate(conn->ssl))) { + int i, rc; + unsigned int sha1_size; + unsigned char sha1[EVP_MAX_MD_SIZE]; + char sha1_ascii[EVP_MAX_MD_SIZE*3+1]; + + X509_digest(server_cert, EVP_sha1(), sha1, &sha1_size); + + for (i=0; i<sha1_size; i++) + sm_snprintf(&sha1_ascii[i*3], 4, "%02X ", sha1[i]); + sha1_ascii[sha1_size*3] = 0; + + /* TODO: Use callbacks for proper decoupling */ + rc = thread_call_function_sync(thread_get_main(), sm_request, 4, NULL, _("Certificate verification error\n\nSHA1: %s"), _("Connect anyway|Abort"), sha1_ascii); + /* Add some checks here */ X509_free(server_cert); - SM_DEBUGF(5,("Connection is secure\n")); - return 1; + if (rc == 1) + { + SM_DEBUGF(5,("Connection is assumed to be secure\n")); + return 1; + } } } else { |
From: Sebastian B. <sb...@us...> - 2014-02-23 13:21:56
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24169 Modified Files: tcp.c Log Message: Record the fail state in the verify hook. Index: tcp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- tcp.c 23 Feb 2014 13:19:57 -0000 1.57 +++ tcp.c 23 Feb 2014 13:21:54 -0000 1.58 @@ -243,6 +243,13 @@ static int tcp_make_secure_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) #endif { + if (!preverify_ok) + { + /* Get ssl object associated to the x509 context */ + SSL *ssl = X509_STORE_CTX_get_ex_data(x509_ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); + int *failed = SSL_get_app_data(ssl); + *failed = 1; + } return preverify_ok; } @@ -257,6 +264,7 @@ { #ifndef NO_SSL int rc; + int failed = 0; if (!open_ssl_lib()) return 0; if (!(conn->ssl = SSL_new(ssl_context()))) @@ -264,6 +272,7 @@ close_ssl_lib(); return 0; } + SSL_set_app_data(conn->ssl, &failed); SSL_set_verify(conn->ssl, SSL_VERIFY_PEER, tcp_make_secure_verify_callback); /* Associate a socket with ssl structure */ |
From: Sebastian B. <sb...@us...> - 2014-02-23 13:19:59
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24021 Modified Files: tcp.c Log Message: Added proper SAS C prototype by using #ifdef. This is not nice, but the quickest way for now to get 68k compability. Index: tcp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- tcp.c 22 Feb 2014 19:54:27 -0000 1.56 +++ tcp.c 23 Feb 2014 13:19:57 -0000 1.57 @@ -237,7 +237,11 @@ * @param x509_ctx * @return */ +#ifdef __SASC +static int __saveds tcp_make_secure_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) +#else static int tcp_make_secure_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) +#endif { return preverify_ok; } |
From: Sebastian B. <sb...@us...> - 2014-02-22 19:54:29
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16829 Modified Files: tcp.c Log Message: Supply a callback for SSL_set_verify(). It doesn't do anything different than the default callback though. Index: tcp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- tcp.c 22 Feb 2014 19:53:40 -0000 1.55 +++ tcp.c 22 Feb 2014 19:54:27 -0000 1.56 @@ -231,6 +231,18 @@ } /** + * The certificate verify callback used in tcp_make_secure(). + * + * @param preverify_ok + * @param x509_ctx + * @return + */ +static int tcp_make_secure_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) +{ + return preverify_ok; +} + +/** * Makes the given connection secure. * * @param conn defines the connection which should be made @@ -248,8 +260,7 @@ close_ssl_lib(); return 0; } - - SSL_set_verify(conn->ssl, SSL_VERIFY_PEER, NULL); + SSL_set_verify(conn->ssl, SSL_VERIFY_PEER, tcp_make_secure_verify_callback); /* Associate a socket with ssl structure */ SSL_set_fd(conn->ssl, conn->socket); |
From: Sebastian B. <sb...@us...> - 2014-02-22 19:54:08
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16778 Modified Files: imap.c smtp.c Log Message: Use error_code directly instead of tcp_error_code() in two places. Index: imap.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/imap.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- imap.c 22 Feb 2014 19:53:39 -0000 1.96 +++ imap.c 22 Feb 2014 19:54:05 -0000 1.97 @@ -1193,7 +1193,7 @@ { SM_DEBUGF(10,("Unable to connect\n")); if (thread_aborted()) break; - else tell_from_subtask((char*)tcp_strerror(tcp_error_code())); + else tell_from_subtask((char*)tcp_strerror(error_code)); } /* Clear the preselection entries */ Index: smtp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/smtp.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- smtp.c 22 Feb 2014 19:53:39 -0000 1.77 +++ smtp.c 22 Feb 2014 19:54:05 -0000 1.78 @@ -965,7 +965,7 @@ if (thread_aborted() && !thread_call_parent_function_sync(NULL,status_skipped,0)) break; - sm_snprintf(message,sizeof(message),_("Unable to connect to server %s: %s"),account->smtp->name,tcp_strerror(tcp_error_code())); + sm_snprintf(message,sizeof(message),_("Unable to connect to server %s: %s"),account->smtp->name,tcp_strerror(error_code)); tell_from_subtask(message); } } |
From: Sebastian B. <sb...@us...> - 2014-02-22 19:53:42
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16716 Modified Files: http.c imap.c pop3.c smtp.c tcp.c tcp.h Log Message: Introduced error_code parameter in tcp_connect(). This can be used instead of querying the error code via tcp_error_code() on failure. Also fixed wrong calls to tcp_connect() that were missed to be changed in a previous commit. Index: smtp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/smtp.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- smtp.c 14 Dec 2012 20:45:39 -0000 1.76 +++ smtp.c 22 Feb 2014 19:53:39 -0000 1.77 @@ -891,6 +891,8 @@ if (open_socket_lib()) { struct account *account; + struct connect_options connect_opts = {0}; + int error_code; for (account = (struct account*)list_first(account_list);account;account = (struct account*)node_next(&account->node)) { @@ -922,7 +924,7 @@ // thread_call_parent_function_async(status_set_status,1,N_("Connecting...")); - if ((conn.conn = tcp_connect(account->smtp->name, account->smtp->port,0))) + if ((conn.conn = tcp_connect(account->smtp->name, account->smtp->port,&connect_opts,&error_code))) { if (smtp_login(&conn,account)) { Index: imap.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/imap.c,v retrieving revision 1.95 retrieving revision 1.96 diff -u -d -r1.95 -r1.96 --- imap.c 22 Feb 2014 19:53:11 -0000 1.95 +++ imap.c 22 Feb 2014 19:53:39 -0000 1.96 @@ -1106,6 +1106,7 @@ struct connection *conn; struct connect_options conn_opts = {0}; char head_buf[100]; + int error_code; SM_DEBUGF(10,("Synchronizing with server \"%s\"\n",server->name)); @@ -1144,7 +1145,7 @@ conn_opts.use_ssl = server->ssl; SM_DEBUGF(10,("Connecting\n")); - if ((conn = tcp_connect(server->name, server->port, &conn_opts))) + if ((conn = tcp_connect(server->name, server->port, &conn_opts, &error_code))) { thread_call_parent_function_async(status_set_status,1,_("Waiting for login...")); SM_DEBUGF(10,("Waiting for login\n")); @@ -1223,6 +1224,7 @@ struct connection *conn; struct connect_options conn_opts = {0}; char head_buf[100]; + int error_code; sm_snprintf(head_buf, sizeof(head_buf), ("Reading folders of %s"),server->name); thread_call_parent_function_async_string(status_set_head, 1, head_buf); @@ -1234,7 +1236,7 @@ conn_opts.use_ssl = server->ssl; - if ((conn = tcp_connect(server->name, server->port, &conn_opts))) + if ((conn = tcp_connect(server->name, server->port, &conn_opts, &error_code))) { thread_call_parent_function_async(status_set_status,1,N_("Waiting for login...")); if (imap_wait_login(conn,server)) @@ -1304,6 +1306,7 @@ struct connection *conn; struct connect_options conn_opts = {0}; char head_buf[100]; + int error_code; sm_snprintf(head_buf,sizeof(head_buf),_("Submitting subscribed folders to %s"),server->name); thread_call_parent_function_async_string(status_set_head, 1, head_buf); @@ -1315,7 +1318,7 @@ conn_opts.use_ssl = server->ssl; - if ((conn = tcp_connect(server->name, server->port, &conn_opts))) + if ((conn = tcp_connect(server->name, server->port, &conn_opts, &error_code))) { thread_call_parent_function_async(status_set_status,1,_("Waiting for login...")); if (imap_wait_login(conn,server)) @@ -1865,6 +1868,7 @@ { char status_buf[160]; struct connect_options conn_opts = {0}; + int error_code; if (!imap_socket_lib_open) imap_socket_lib_open = open_socket_lib(); @@ -1908,7 +1912,7 @@ conn_opts.use_ssl = imap_server->ssl; - if ((imap_connection = tcp_connect(imap_server->name, imap_server->port, &conn_opts))) + if ((imap_connection = tcp_connect(imap_server->name, imap_server->port, &conn_opts, &error_code))) { SM_DEBUGF(20,("Connected to %s\n",imap_server->name)); Index: http.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/http.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- http.c 21 Feb 2010 16:46:47 -0000 1.12 +++ http.c 22 Feb 2014 19:53:39 -0000 1.13 @@ -48,13 +48,15 @@ int http_download_photo(char *path, char *email) { struct connection *conn; + struct connect_options conn_opts = {0}; + int error_code; int rc; if (!open_socket_lib()) return 0; rc = 0; - if ((conn = tcp_connect("simplemail.sourceforge.net",80,0))) + if ((conn = tcp_connect("simplemail.sourceforge.net", 80, &conn_opts, &error_code))) { char *line; int download = 0; @@ -101,6 +103,8 @@ char *path_buf; char *port_buf; struct connection *conn; + struct connect_options connect_opts = {0}; + int error_code; char *server; uri += 7; @@ -126,7 +130,7 @@ if (open_socket_lib()) { - if ((conn = tcp_connect(server,port,0))) + if ((conn = tcp_connect(server,port,&connect_opts,&error_code))) { FILE *fh; Index: pop3.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/pop3.c,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- pop3.c 22 Feb 2014 09:40:57 -0000 1.108 +++ pop3.c 22 Feb 2014 19:53:39 -0000 1.109 @@ -943,6 +943,7 @@ struct connection *conn; struct connect_options connect_options = {0}; char head_buf[100]; + int error_code; rc = 0; @@ -980,7 +981,7 @@ connect_options.use_ssl = server->ssl && !server->stls; - if ((conn = tcp_connect(server->name, server->port, &connect_options))) + if ((conn = tcp_connect(server->name, server->port, &connect_options, &error_code))) { char *timestamp; thread_call_parent_function_async(status_set_status,1,_("Waiting for login...")); @@ -1000,7 +1001,7 @@ pop3_quit(conn,server); tcp_disconnect(conn); SM_DEBUGF(15,("Trying to connect again to the server\n")); - if ((conn = tcp_connect(server->name, server->port, &connect_options))) + if ((conn = tcp_connect(server->name, server->port, &connect_options, &error_code))) { if (pop3_wait_login(conn,server,NULL)) { @@ -1174,10 +1175,11 @@ { struct connection *conn; struct connect_options conn_opts = {0}; + int error_code; conn_opts.use_ssl = server->ssl && (!server->stls); - if ((conn = tcp_connect(server->name, server->port, &conn_opts))) + if ((conn = tcp_connect(server->name, server->port, &conn_opts, &error_code))) { char *timestamp; @@ -1194,7 +1196,7 @@ In such cases a reconnect should help. */ pop3_quit(conn,server); tcp_disconnect(conn); - if ((conn = tcp_connect(server->name, server->port, &conn_opts))) + if ((conn = tcp_connect(server->name, server->port, &conn_opts, &error_code))) { if (pop3_wait_login(conn,server,NULL)) { Index: tcp.h =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- tcp.h 22 Feb 2014 19:52:45 -0000 1.19 +++ tcp.h 22 Feb 2014 19:53:40 -0000 1.20 @@ -65,7 +65,7 @@ int tcp_error_code(void); const char *tcp_strerror(int code); -struct connection *tcp_connect(char *server, unsigned int port, struct connect_options *options, int *error_code); +struct connection *tcp_connect(char *server, unsigned int port, struct connect_options *options, int *error_code_ptr); void tcp_disconnect(struct connection *conn); int tcp_make_secure(struct connection *conn); int tcp_secure(struct connection *conn); Index: tcp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- tcp.c 22 Feb 2014 19:52:25 -0000 1.54 +++ tcp.c 22 Feb 2014 19:53:40 -0000 1.55 @@ -108,11 +108,12 @@ * should be created. * @param port defines to which server port the connection should be established. * @param options defines additional options, such as if the connection should be made secure. + * @param error_code_ptr specifies a location in which an additional error code is stored if the call returns NULL. * @return the connection or NULL on failure. Use tcp_error_code() for more information. * * @note TODO: Rework the error code handling. */ -struct connection *tcp_connect(char *server, unsigned int port, struct connect_options *options) +struct connection *tcp_connect(char *server, unsigned int port, struct connect_options *options, int *error_code_ptr) { int i,sd; struct sockaddr_in sockaddr; |
From: Sebastian B. <sb...@us...> - 2014-02-22 19:53:13
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16686 Modified Files: imap.c Log Message: Use sm_snprintf() instead of sprintf(). Index: imap.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/imap.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- imap.c 22 Feb 2014 09:40:57 -0000 1.94 +++ imap.c 22 Feb 2014 19:53:11 -0000 1.95 @@ -1224,7 +1224,7 @@ struct connect_options conn_opts = {0}; char head_buf[100]; - sprintf(head_buf,_("Reading folders of %s"),server->name); + sm_snprintf(head_buf, sizeof(head_buf), ("Reading folders of %s"),server->name); thread_call_parent_function_async_string(status_set_head, 1, head_buf); if (server->title) thread_call_parent_function_async_string(status_set_title_utf8, 1, server->title); |
From: Sebastian B. <sb...@us...> - 2014-02-22 19:52:47
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16620 Modified Files: tcp.h Log Message: Enabeld TCP_OK again. Index: tcp.h =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- tcp.h 21 Feb 2014 06:39:08 -0000 1.18 +++ tcp.h 22 Feb 2014 19:52:45 -0000 1.19 @@ -65,7 +65,7 @@ int tcp_error_code(void); const char *tcp_strerror(int code); -struct connection *tcp_connect(char *server, unsigned int port, struct connect_options *options); +struct connection *tcp_connect(char *server, unsigned int port, struct connect_options *options, int *error_code); void tcp_disconnect(struct connection *conn); int tcp_make_secure(struct connection *conn); int tcp_secure(struct connection *conn); @@ -76,7 +76,7 @@ char *tcp_readln(struct connection *conn); int tcp_gethostname(char *buf, int buf_size); -/*#define TCP_OK 0*/ +#define TCP_OK 0 #define TCP_UNKNOWN -1 /* Unspecified error */ #define TCP_NOT_ENOUGH_MEMORY -2 /* Not enough memory */ #define TCP_NOT_SECURE -3 /* Connection couldn't made secure */ |
From: Sebastian B. <sb...@us...> - 2014-02-22 19:52:28
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16592 Modified Files: tcp.c Log Message: Fixed doc. Index: tcp.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tcp.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- tcp.c 21 Feb 2014 06:39:08 -0000 1.53 +++ tcp.c 22 Feb 2014 19:52:25 -0000 1.54 @@ -107,7 +107,7 @@ * @param server defines the name of the server to which the connection * should be created. * @param port defines to which server port the connection should be established. - * @param options defines additional connection should be made secure. + * @param options defines additional options, such as if the connection should be made secure. * @return the connection or NULL on failure. Use tcp_error_code() for more information. * * @note TODO: Rework the error code handling. |
From: Sebastian B. <sb...@us...> - 2014-02-22 19:52:09
|
Update of /cvsroot/simplemail/simplemail/tests In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16565/tests Modified Files: codesets_unittest.c Log Message: Added a basic test. Index: codesets_unittest.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tests/codesets_unittest.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- codesets_unittest.c 16 Dec 2012 10:34:24 -0000 1.1 +++ codesets_unittest.c 22 Feb 2014 19:52:06 -0000 1.2 @@ -44,3 +44,16 @@ CU_ASSERT(utf8len("ö")==1); } +/*******************************************************/ + +/* @Test */ +void test_codeset(void) +{ + struct codeset *cs; + + CU_ASSERT(codesets_init() != 0); + + CU_ASSERT((cs = codesets_find(NULL)) != NULL); + + codesets_cleanup(); +} |
From: Sebastian B. <sb...@us...> - 2014-02-22 14:04:25
|
Update of /cvsroot/simplemail/simplemail/tests In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27455 Modified Files: makefile Log Message: Added dovecot sha1sum check. Index: makefile =================================================================== RCS file: /cvsroot/simplemail/simplemail/tests/makefile,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- makefile 22 Feb 2014 12:36:25 -0000 1.48 +++ makefile 22 Feb 2014 14:04:23 -0000 1.49 @@ -74,12 +74,14 @@ # Dovecot support DOVECOT_URL=http://www.dovecot.org/releases/2.2/dovecot-2.2.9.tar.gz DOVECOT_TGZ=$(notdir $(DOVECOT_URL)) +DOVECOT_SHA1SUM=efba4dee63c7dab2b9950e51874a86ba17e09d0c DOVECOT_DIR=$(DOVECOT_TGZ:%.tar.gz=%) DOVECOT_ABSDIR=$(shell pwd)/$(DOVECOT_DIR) DOVECOT=$(DOVECOT_DIR)-root/sbin/dovecot $(DOVECOT_TGZ): wget -N $(DOVECOT_URL) + echo "$(DOVECOT_SHA1SUM) $(DOVECOT_TGZ)" | sha1sum -c $(DOVECOT_DIR)-root: $(DOVECOT_TGZ) rm -Rf $(DOVECOT_DIR) |
From: Sebastian B. <sb...@us...> - 2014-02-22 12:36:27
|
Update of /cvsroot/simplemail/simplemail/tests In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22371 Modified Files: makefile Log Message: Added possibility to skip certain targets for memleaks. Index: makefile =================================================================== RCS file: /cvsroot/simplemail/simplemail/tests/makefile,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- makefile 21 Feb 2014 06:36:38 -0000 1.47 +++ makefile 22 Feb 2014 12:36:25 -0000 1.48 @@ -34,6 +34,9 @@ text2html_unittest \ tcp_unittest +NOMEMLEAKSPERDEFAULT=\ + index_unittest + test-objs/%.o: ../%.c @mkdir -p $(@D) $(CC) $(CFLAGS) -c $< -o $@ @@ -123,9 +126,6 @@ ./imap2_unittest $(DOVECOT) stop -# Define memleak targets -MEMLEAKS_TARGETS = $(foreach testexe,$(TESTEXES),memleaks-$(testexe)) - # run template define run.tmpl run-$(1): $(1) $(if $(findstring imap,$(1)), dovecot-conf) @@ -158,6 +158,10 @@ $(eval $(call memleak.tmpl,$(testexe))) \ ) +# Define our default memleak targets, i.e., targets that need +# to be done for the memleaks target. +MEMLEAKS_TARGETS = $(foreach testexe,$(filter-out $(NOMEMLEAKSPERDEFAULT),$(TESTEXES)),memleaks-$(testexe)) + .PHONY: memleaks memleaks: $(MEMLEAKS_TARGETS) |
From: Sebastian B. <sb...@us...> - 2014-02-22 12:05:37
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20781 Modified Files: ssl.c Log Message: Disable the usage of ssl2. Index: ssl.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/ssl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ssl.c 21 Feb 2014 06:36:10 -0000 1.2 +++ ssl.c 22 Feb 2014 12:05:35 -0000 1.3 @@ -45,6 +45,8 @@ if ((ctx = SSL_CTX_new(SSLv23_client_method()))) { + SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2); + if (SSL_CTX_set_default_verify_paths(ctx)) { return ctx; |
From: Sebastian B. <sb...@us...> - 2014-02-22 11:42:52
|
Update of /cvsroot/simplemail/simplemail/tests In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19580 Modified Files: tcp_unittest.c Log Message: Disabled test for now. Index: tcp_unittest.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tests/tcp_unittest.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tcp_unittest.c 21 Feb 2014 06:32:44 -0000 1.2 +++ tcp_unittest.c 22 Feb 2014 11:42:50 -0000 1.3 @@ -32,8 +32,9 @@ void test_make_secure(void) { struct connection *connect; - +#if 0 connect = tcp_connect("localhost", 6252, 1); CU_ASSERT(connect != NULL); tcp_disconnect(connect); +#endif } |