]> git.eshelyaron.com Git - emacs.git/commitdiff
Make setting verify-hostname-error not make connections fail
authorRobert Pluim <rpluim@gmail.com>
Fri, 2 Oct 2020 02:49:39 +0000 (04:49 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 2 Oct 2020 02:49:39 +0000 (04:49 +0200)
* lisp/net/gnutls.el (gnutls-boot-parameters): If
verify-hostname-error was set, this would make verify-error a
non-proper list (bug#38602).

lisp/net/gnutls.el

index e713c94117b5c9b7de4e9ba88f60e3f2c99dfe7b..8ad721964dd4130d32cd3ae9b6ea03b70a0cbf43 100644 (file)
@@ -348,8 +348,11 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT."
                             (t nil))))
          (min-prime-bits (or min-prime-bits gnutls-min-prime-bits)))
 
-    (when verify-hostname-error
-      (push :hostname verify-error))
+    ;; Only add :hostname if `verify-error' is not t, since t
+    ;; means "include :hostname" Bug#38602.
+    (and verify-hostname-error
+         (not (eq verify-error t))
+         (push :hostname verify-error))
 
     `(:priority ,priority-string
                 :hostname ,hostname