Andreas Krennmair:
[apps/madmutt.git] / mutt_socket.c
index 50ee94d..ebff846 100644 (file)
  *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  */ 
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "mutt.h"
 #include "globals.h"
 #include "mutt_socket.h"
 #include "mutt_tunnel.h"
-#ifdef USE_SSL
+#if defined(USE_SSL) || defined(USE_GNUTLS) || defined(USE_NSS)
 # include "mutt_ssl.h"
 #endif
 
@@ -257,6 +261,12 @@ CONNECTION* mutt_conn_find (const CONNECTION* start, const ACCOUNT* account)
     ssl_socket_setup (conn);
 #elif USE_NSS
     mutt_nss_socket_setup (conn);
+#elif USE_GNUTLS
+    if (mutt_gnutls_socket_setup (conn) < 0)
+    {
+      mutt_socket_free (conn);
+      return NULL;
+    }
 #else
     mutt_error _("SSL is unavailable.");
     mutt_sleep (2);