summaryrefslogtreecommitdiff
path: root/lisp/net/gnutls.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2018-04-13 16:38:10 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2018-04-13 16:38:10 +0200
commit4a6302330384ad89bcfccce6b563eb5462b753a9 (patch)
tree2695c81d4681e5e62fbbde9dbd9fd68707423f35 /lisp/net/gnutls.el
parent1fd104d30a8985e1f6962eb325207efad96273b6 (diff)
downloademacs-4a6302330384ad89bcfccce6b563eb5462b753a9.tar.gz
Make Unicode domain names work again in URL after recent changes
* lisp/net/gnutls.el (open-gnutls-stream): IDNA-encode hostnames before passing them on to gnutls for verification. * lisp/net/network-stream.el (network-stream-open-starttls): Ditto. * lisp/url/url-http.el (url-http--get-referer): Be IDNA-aware. (url-http-create-request): Don't de-Unicodify host names, because they may be IDNA names (that are later encoded). * lisp/url/url-util.el (url-domain): Be IDNA-aware when doing domain name computations.
Diffstat (limited to 'lisp/net/gnutls.el')
-rw-r--r--lisp/net/gnutls.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index 57ac26fc741..cea6c25112e 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -154,12 +154,12 @@ trust and key files, and priority string."
(cons 'gnutls-x509pki
(gnutls-boot-parameters
:type 'gnutls-x509pki
- :hostname host))))))
+ :hostname (puny-encode-domain host)))))))
(if nowait
process
(gnutls-negotiate :process process
:type 'gnutls-x509pki
- :hostname host))))
+ :hostname (puny-encode-domain host)))))
(define-error 'gnutls-error "GnuTLS error")