2012-08-09 [colin] 3.8.1cvs26
[claws.git] / src / common / ssl.c
index abb308e8de0e6eb4a2c87485f645df6f26d7ba3f..9e8b242b7548bfac03a7cb5a6cab89043de7cc5a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
+#include "claws-features.h"
 #endif
 
 #ifdef USE_GNUTLS
@@ -104,6 +105,7 @@ const gchar *claws_ssl_get_cert_file(void)
        const char *cert_files[]={
                "/etc/pki/tls/certs/ca-bundle.crt",
                "/etc/certs/ca-bundle.crt",
+               "/etc/ssl/ca-bundle.pem",
                "/usr/share/ssl/certs/ca-bundle.crt",
                "/etc/ssl/certs/ca-certificates.crt",
                "/usr/local/ssl/certs/ca-bundle.crt",
@@ -267,7 +269,10 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
 #if GNUTLS_VERSION_NUMBER < 0x030003
        gnutls_transport_set_lowat (session, 0); 
 #endif
-       gnutls_priority_set_direct(session, "NORMAL", NULL);
+       if (method == 0)
+               gnutls_priority_set_direct(session, "NORMAL:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-TLS1.2", NULL);
+       else
+               gnutls_priority_set_direct(session, "NORMAL", NULL);
        gnutls_record_disable_padding(session);
 
        gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);