mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pdmef+fix+sslinterface. Triggered by a warning when compiling with POP and GNUTLS, I noticed the SSL interfaces for OpenSSL and GNUTLS internally are different which doesn't make sense.

+54 -57
+4
buffy.c
··· 309 309 310 310 #ifdef USE_IMAP 311 311 if (tmp->magic != M_IMAP) 312 + { 312 313 #endif 313 314 #ifdef USE_POP 314 315 if (mx_is_pop (tmp->path)) ··· 327 328 #endif 328 329 continue; 329 330 } 331 + #ifdef USE_IMAP 332 + } 333 + #endif 330 334 331 335 /* check to see if the folder is the currently selected folder 332 336 * before polling */
+5 -2
configure.in
··· 587 587 AC_CHECK_FUNCS(RAND_status RAND_egd) 588 588 589 589 AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ]) 590 + AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL via OpenSSL. ]) 590 591 LIBS="$saved_LIBS" 591 592 MUTTLIBS="$MUTTLIBS -lssl -lcrypto" 592 593 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o" ··· 597 598 598 599 AC_ARG_WITH([gnutls], AC_HELP_STRING([--with-gnutls[=PFX]], [Enable SSL support using gnutls]), 599 600 [gnutls_prefix="$withval"], [gnutls_prefix="no"]) 600 - if test "$gnutls_prefix" != "no" 601 + if test "$gnutls_prefix" != "no" -a x"$need_ssl" != xyes 601 602 then 602 603 if test "$need_socket" != "yes" 603 604 then ··· 607 608 [dnl GNUTLS found 608 609 CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS" 609 610 MUTTLIBS="$MUTTLIBS $LIBGNUTLS_LIBS" 610 - AC_DEFINE(USE_GNUTLS, 1, [Define if you want support for SSL via the gnutls library.]) 611 + 612 + AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ]) 613 + AC_DEFINE(USE_SSL_GNUTLS,1,[ Define if you want support for SSL via GNUTLS. ]) 611 614 612 615 MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_gnutls.o" 613 616 need_ssl=yes],
+3 -3
globals.h
··· 115 115 WHERE char *SimpleSearch; 116 116 WHERE char *Spoolfile; 117 117 WHERE char *SpamSep; 118 - #if defined(USE_SSL) || defined(USE_GNUTLS) 118 + #if defined(USE_SSL) 119 119 WHERE char *SslCertFile INITVAL (NULL); 120 120 #endif 121 - #ifdef USE_SSL 121 + #ifdef USE_SSL_OPENSSL 122 122 WHERE char *SslClientCert INITVAL (NULL); 123 123 WHERE LIST *SslSessionCerts INITVAL (NULL); 124 124 #endif 125 125 #if defined(USE_SSL) 126 126 WHERE char *SslEntropyFile INITVAL (NULL); 127 127 #endif 128 - #ifdef USE_GNUTLS 128 + #ifdef USE_SSL_GNUTLS 129 129 WHERE short SslDHPrimeBits; 130 130 WHERE char *SslCACertFile INITVAL (NULL); 131 131 #endif
+4 -6
imap/imap.c
··· 32 32 #include "browser.h" 33 33 #include "message.h" 34 34 #include "imap_private.h" 35 - #if defined(USE_SSL) || defined(USE_GNUTLS) 35 + #if defined(USE_SSL) 36 36 # include "mutt_ssl.h" 37 37 #endif 38 38 #include "buffy.h" ··· 409 409 if (ascii_strncasecmp ("* OK [CAPABILITY", idata->buf, 16) 410 410 && imap_check_capabilities (idata)) 411 411 goto bail; 412 - #if defined(USE_SSL) || defined(USE_GNUTLS) 412 + #if defined(USE_SSL) 413 413 /* Attempt STARTTLS if available and desired. */ 414 414 if (!idata->conn->ssf && (option(OPTSSLFORCETLS) || 415 415 mutt_bit_isset (idata->capabilities, STARTTLS))) ··· 426 426 goto bail; 427 427 if (rc != -2) 428 428 { 429 - #ifdef USE_SSL 430 429 if (mutt_ssl_starttls (idata->conn)) 431 - #elif USE_GNUTLS 432 - if (mutt_gnutls_starttls (idata->conn)) 433 - #endif 434 430 { 435 431 mutt_error (_("Could not negotiate TLS connection")); 436 432 mutt_sleep (1); ··· 469 465 470 466 return 0; 471 467 468 + #if defined(USE_SSL) 472 469 err_close_conn: 473 470 mutt_socket_close (idata->conn); 474 471 idata->state = IMAP_DISCONNECTED; 472 + #endif 475 473 bail: 476 474 FREE (&idata->capstr); 477 475 return -1;
+1 -1
init.c
··· 31 31 #include "mutt_crypt.h" 32 32 #include "mutt_idna.h" 33 33 34 - #if defined(USE_SSL) || defined(USE_GNUTLS) 34 + #if defined(USE_SSL) 35 35 #include "mutt_ssl.h" 36 36 #endif 37 37
+14 -11
init.h
··· 92 92 # ifndef USE_POP 93 93 # define USE_POP 94 94 # endif 95 + # ifndef USE_SSL_OPENSSL 96 + # define USE_SSL_OPENSSL 97 + # endif 98 + # ifndef USE_SSL_GNUTLS 99 + # define USE_SSL_GNUTLS 100 + # endif 95 101 # ifndef USE_SSL 96 102 # define USE_SSL 97 - # endif 98 - # ifndef USE_GNUTLS 99 - # define USE_GNUTLS 100 103 # endif 101 104 # ifndef USE_SOCKET 102 105 # define USE_SOCKET ··· 1914 1917 ** (S/MIME only) 1915 1918 */ 1916 1919 1917 - #if defined(USE_SSL) || defined(USE_GNUTLS) 1918 - #ifdef USE_SSL 1920 + #if defined(USE_SSL) 1921 + #ifdef USE_SSL_OPENSSL 1919 1922 { "ssl_client_cert", DT_PATH, R_NONE, UL &SslClientCert, 0 }, 1920 1923 /* 1921 1924 ** .pp 1922 1925 ** The file containing a client certificate and its associated private 1923 1926 ** key. 1924 1927 */ 1925 - #endif /* USE_SSL */ 1928 + #endif /* USE_SSL_OPENSSL */ 1926 1929 { "ssl_force_tls", DT_BOOL, R_NONE, OPTSSLFORCETLS, 0 }, 1927 1930 /* 1928 1931 ** .pp ··· 1954 1957 ** .pp 1955 1958 ** Example: set certificate_file=~/.mutt/certificates 1956 1959 */ 1957 - # if defined _MAKEDOC || !defined(USE_GNUTLS) 1960 + # if defined _MAKEDOC || !defined(USE_SSL_GNUTLS) 1958 1961 { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPTSSLSYSTEMCERTS, 1 }, 1959 1962 /* 1960 1963 ** .pp ··· 1974 1977 ** This variables specifies whether to attempt to use SSLv2 in the 1975 1978 ** SSL authentication process. 1976 1979 */ 1977 - # endif /* defined _MAKEDOC || !defined(USE_GNUTLS) */ 1980 + # endif /* defined _MAKEDOC || !defined(USE_SSL_GNUTLS) */ 1978 1981 { "ssl_use_sslv3", DT_BOOL, R_NONE, OPTSSLV3, 1 }, 1979 1982 /* 1980 1983 ** .pp ··· 1987 1990 ** This variables specifies whether to attempt to use TLSv1 in the 1988 1991 ** SSL authentication process. 1989 1992 */ 1990 - # ifdef USE_GNUTLS 1993 + # ifdef USE_SSL_GNUTLS 1991 1994 { "ssl_min_dh_prime_bits", DT_NUM, R_NONE, UL &SslDHPrimeBits, 0 }, 1992 1995 /* 1993 1996 ** .pp ··· 2004 2007 ** .pp 2005 2008 ** Example: set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt 2006 2009 */ 2007 - # endif /* USE_GNUTLS */ 2008 - #endif /* defined(USE_SSL) || defined(USE_GNUTLS) */ 2010 + # endif /* USE_SSL_GNUTLS */ 2011 + #endif /* defined(USE_SSL) */ 2009 2012 2010 2013 { "pipe_split", DT_BOOL, R_NONE, OPTPIPESPLIT, 0 }, 2011 2014 /*
+6 -6
main.c
··· 264 264 #endif 265 265 266 266 267 - #ifdef USE_SSL 268 - "+USE_SSL " 267 + #ifdef USE_SSL_OPENSSL 268 + "+USE_SSL_OPENSSL " 269 269 #else 270 - "-USE_SSL " 270 + "-USE_SSL_OPENSSL " 271 271 #endif 272 272 273 - #ifdef USE_GNUTLS 274 - "+USE_GNUTLS " 273 + #ifdef USE_SSL_GNUTLS 274 + "+USE_SSL_GNUTLS " 275 275 #else 276 - "-USE_GNUTLS " 276 + "-USE_SSL_GNUTLS " 277 277 #endif 278 278 279 279 #ifdef USE_SASL
+6 -6
mutt.h
··· 248 248 249 249 /* options for socket code */ 250 250 M_NEW_SOCKET, 251 - #ifdef USE_SSL 251 + #ifdef USE_SSL_OPENSSL 252 252 M_NEW_SSL_SOCKET, 253 253 #endif 254 254 ··· 289 289 OPT_QUIT, 290 290 OPT_REPLYTO, 291 291 OPT_RECALL, 292 - #if defined(USE_SSL) || defined(USE_GNUTLS) 292 + #if defined(USE_SSL) 293 293 OPT_SSLSTARTTLS, 294 294 #endif 295 295 OPT_SUBJECT, ··· 376 376 OPTIMAPPEEK, 377 377 OPTIMAPSERVERNOISE, 378 378 #endif 379 - #if defined(USE_SSL) || defined(USE_GNUTLS) 380 - # ifndef USE_GNUTLS 379 + #if defined(USE_SSL) 380 + # ifndef USE_SSL_GNUTLS 381 381 OPTSSLSYSTEMCERTS, 382 382 OPTSSLV2, 383 - # endif /* USE_GNUTLS */ 383 + # endif /* USE_SSL_GNUTLS */ 384 384 OPTSSLV3, 385 385 OPTTLSV1, 386 386 OPTSSLFORCETLS, 387 - #endif /* defined(USE_SSL) || defined(USE_GNUTLS) */ 387 + #endif /* defined(USE_SSL) */ 388 388 OPTIMPLICITAUTOVIEW, 389 389 OPTINCLUDEONLYFIRST, 390 390 OPTKEEPFLAGGED,
+3 -5
mutt_socket.c
··· 26 26 #include "globals.h" 27 27 #include "mutt_socket.h" 28 28 #include "mutt_tunnel.h" 29 - #if defined(USE_SSL) || defined(USE_GNUTLS) 29 + #if defined(USE_SSL) 30 30 # include "mutt_ssl.h" 31 31 #endif 32 32 ··· 275 275 mutt_tunnel_socket_setup (conn); 276 276 else if (account->flags & M_ACCT_SSL) 277 277 { 278 - #ifdef USE_SSL 279 - ssl_socket_setup (conn); 280 - #elif USE_GNUTLS 281 - if (mutt_gnutls_socket_setup (conn) < 0) 278 + #if defined(USE_SSL) 279 + if (mutt_ssl_socket_setup (conn) < 0) 282 280 { 283 281 mutt_socket_free (conn); 284 282 return NULL;
+1 -1
mutt_ssl.c
··· 229 229 } 230 230 231 231 232 - int ssl_socket_setup (CONNECTION * conn) 232 + int mutt_ssl_socket_setup (CONNECTION * conn) 233 233 { 234 234 if (ssl_init() < 0) 235 235 {
+2 -7
mutt_ssl.h
··· 21 21 22 22 #include "mutt_socket.h" 23 23 24 - #ifdef USE_SSL 24 + #if defined(USE_SSL) 25 25 int mutt_ssl_starttls (CONNECTION* conn); 26 - 27 - extern int ssl_socket_setup (CONNECTION *conn); 26 + int mutt_ssl_socket_setup (CONNECTION *conn); 28 27 #endif 29 - #ifdef USE_GNUTLS 30 - int mutt_gnutls_starttls (CONNECTION* conn); 31 28 32 - extern int mutt_gnutls_socket_setup (CONNECTION *conn); 33 - #endif 34 29 #endif /* _MUTT_SSL_H_ */
+3 -3
mutt_ssl_gnutls.c
··· 72 72 return 0; 73 73 } 74 74 75 - int mutt_gnutls_socket_setup (CONNECTION* conn) 75 + int mutt_ssl_socket_setup (CONNECTION* conn) 76 76 { 77 77 if (tls_init() < 0) 78 78 return -1; ··· 144 144 return 0; 145 145 } 146 146 147 - int mutt_gnutls_starttls (CONNECTION* conn) 147 + int mutt_ssl_starttls (CONNECTION* conn) 148 148 { 149 149 if (tls_init() < 0) 150 150 return -1; ··· 441 441 strcmp(linestr + pmatch[2].rm_so, buf) == 0) 442 442 { 443 443 regfree(&preg); 444 - safe_free((void**)&linestr); 444 + FREE(&linestr); 445 445 fclose(fp); 446 446 return 1; 447 447 }
+2 -6
pop_lib.c
··· 24 24 #include "mx.h" 25 25 #include "url.h" 26 26 #include "pop.h" 27 - #ifdef USE_SSL 27 + #if defined(USE_SSL) 28 28 # include "mutt_ssl.h" 29 29 #endif 30 30 ··· 274 274 return -2; 275 275 } 276 276 277 - #if defined(USE_SSL) || defined(USE_GNUTLS) 277 + #if defined(USE_SSL) 278 278 /* Attempt STLS if available and desired. */ 279 279 if (!pop_data->conn->ssf && (pop_data->cmd_stls || option(OPTSSLFORCETLS))) 280 280 { ··· 301 301 mutt_error ("%s", pop_data->err_msg); 302 302 mutt_sleep (2); 303 303 } 304 - #ifdef USE_SSL 305 304 else if (mutt_ssl_starttls (pop_data->conn)) 306 - #elif USE_GNUTLS 307 - else if (mutt_gnutls_starttls (pop_data->conn)) 308 - #endif 309 305 { 310 306 mutt_error (_("Could not negotiate TLS connection")); 311 307 mutt_sleep (2);