Make setting verify-hostname-error not make connections fail

* lisp/net/gnutls.el (gnutls-boot-parameters): If
verify-hostname-error was set, this would make verify-error a
non-proper list (bug#38602).
This commit is contained in:
Robert Pluim 2020-10-02 04:49:39 +02:00 committed by Lars Ingebrigtsen
parent 6f36b67e41
commit acfbacefc4

View 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