summaryrefslogtreecommitdiff
path: root/lisp/net/gnutls.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/gnutls.el')
-rw-r--r--lisp/net/gnutls.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index 5212bf6a3f6..8ad721964dd 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -170,8 +170,9 @@ Third arg HOST is the name of the host to connect to, or its IP address.
Fourth arg SERVICE is the name of the service desired, or an integer
specifying a port number to connect to.
Fifth arg PARAMETERS is an optional list of keyword/value pairs.
-Only :client-certificate and :nowait keywords are recognized, and
-have the same meaning as for `open-network-stream'.
+Only :client-certificate, :nowait, and :coding keywords are
+recognized, and have the same meaning as for
+`open-network-stream'.
For historical reasons PARAMETERS can also be a symbol, which is
interpreted the same as passing a list containing :nowait and the
value of that symbol.
@@ -209,7 +210,8 @@ trust and key files, and priority string."
(gnutls-boot-parameters
:type 'gnutls-x509pki
:keylist keylist
- :hostname (puny-encode-domain host)))))))
+ :hostname (puny-encode-domain host))))
+ :coding (plist-get parameters :coding))))
(if nowait
process
(gnutls-negotiate :process process
@@ -346,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