]> granicus.if.org Git - neomutt/commitdiff
mutt-1.5.23-ssl_ciphers
authorRichard Russon <rich@flatcap.org>
Wed, 1 Jun 2016 20:38:22 +0000 (21:38 +0100)
committerRichard Russon <rich@flatcap.org>
Sun, 27 Oct 2019 03:11:10 +0000 (03:11 +0000)
conn/ssl_gnutls.c
init.h

index dfadce39d20a47a9040622ae5739dc40f676e295..650e09640ef4b39790bb755f6be3d6a71e3b2636 100644 (file)
@@ -918,36 +918,39 @@ static int tls_set_priority(struct TlsSockData *data)
   else
     mutt_buffer_strcpy(priority, "NORMAL");
 
-  if (!C_SslUseTlsv13)
+  if (C_SslCiphers && (strcmp(C_SslCiphers, "@SYSTEM") == 0))
   {
-    nproto--;
-    mutt_buffer_addstr(priority, ":-VERS-TLS1.3");
-  }
-  if (!C_SslUseTlsv12)
-  {
-    nproto--;
-    mutt_buffer_addstr(priority, ":-VERS-TLS1.2");
-  }
-  if (!C_SslUseTlsv11)
-  {
-    nproto--;
-    mutt_buffer_addstr(priority, ":-VERS-TLS1.1");
-  }
-  if (!C_SslUseTlsv1)
-  {
-    nproto--;
-    mutt_buffer_addstr(priority, ":-VERS-TLS1.0");
-  }
-  if (!C_SslUseSslv3)
-  {
-    nproto--;
-    mutt_buffer_addstr(priority, ":-VERS-SSL3.0");
-  }
+    if (!C_SslUseTlsv13)
+    {
+      nproto--;
+      mutt_buffer_addstr(priority, ":-VERS-TLS1.3");
+    }
+    if (!C_SslUseTlsv12)
+    {
+      nproto--;
+      mutt_buffer_addstr(priority, ":-VERS-TLS1.2");
+    }
+    if (!C_SslUseTlsv11)
+    {
+      nproto--;
+      mutt_buffer_addstr(priority, ":-VERS-TLS1.1");
+    }
+    if (!C_SslUseTlsv1)
+    {
+      nproto--;
+      mutt_buffer_addstr(priority, ":-VERS-TLS1.0");
+    }
+    if (!C_SslUseSslv3)
+    {
+      nproto--;
+      mutt_buffer_addstr(priority, ":-VERS-SSL3.0");
+    }
 
-  if (nproto == 0)
-  {
-    mutt_error(_("All available protocols for TLS/SSL connection disabled"));
-    goto cleanup;
+    if (nproto == 0)
+    {
+      mutt_error(_("All available protocols for TLS/SSL connection disabled"));
+      goto cleanup;
+    }
   }
 
   int err = gnutls_priority_set_direct(data->state, mutt_b2s(priority), NULL);
diff --git a/init.h b/init.h
index f0653826843b978ae8052b601080608b8912f9ef..c28db7ad88d59bf3630c1d804d41182a222b5c71 100644 (file)
--- a/init.h
+++ b/init.h
@@ -4337,7 +4337,7 @@ struct ConfigDef MuttVars[] = {
   ** .te
   */
 #endif /* USE_SSL_GNUTLS */
-  { "ssl_ciphers", DT_STRING, &C_SslCiphers, 0 },
+  { "ssl_ciphers", DT_STRING, &C_SslCiphers, IP "@SYSTEM" },
   /*
   ** .pp
   ** Contains a colon-separated list of ciphers to use when using SSL.