diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index 538d607d327..608827d7cee 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -3,7 +3,7 @@ ;; Keywords: comm, data, processes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1997, 1998 Free Software Foundation, Inc. +;;; Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. ;;; @@ -29,6 +29,7 @@ (autoload 'socks-open-network-stream "socks") (autoload 'open-ssl-stream "ssl") +(autoload 'open-tls-stream "tls") (defgroup url-gateway nil "URL gateway variables" @@ -212,6 +213,7 @@ Args per `open-network-stream'. Will not make a connexion if `url-gateway-unplugged' is non-nil." (unless url-gateway-unplugged (let ((gw-method (if (and url-gateway-local-host-regexp + (not (eq 'tls url-gateway-method)) (not (eq 'ssl url-gateway-method)) (string-match url-gateway-local-host-regexp @@ -242,6 +244,8 @@ Will not make a connexion if `url-gateway-unplugged' is non-nil." (let ((coding-system-for-read 'binary) (coding-system-for-write 'binary)) (setq conn (case gw-method + (tls + (open-tls-stream name buffer host service)) (ssl (open-ssl-stream name buffer host service)) ((native) diff --git a/lisp/url/url-https.el b/lisp/url/url-https.el index 11b2593ea80..9631aeb18e4 100644 --- a/lisp/url/url-https.el +++ b/lisp/url/url-https.el @@ -1,4 +1,4 @@ -;;; url-https.el --- HTTP over SSL routines +;;; url-https.el --- HTTP over SSL/TLS routines ;; Copyright (c) 1999, 2004 Free Software Foundation, Inc. @@ -30,6 +30,7 @@ (require 'url-parse) (require 'url-cookie) (require 'url-http) +(require 'tls) (defconst url-https-default-port 443 "Default HTTPS port.") (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") @@ -38,12 +39,11 @@ (defmacro url-https-create-secure-wrapper (method args) `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) - (condition-case () - (require 'ssl) - (error - (error "HTTPS support could not find `ssl' library"))) - (let ((url-gateway-method 'ssl)) - ( ,(intern (format (if method "url-http-%s" "url-http") method)) ,@(remove '&rest (remove '&optional args)))))) + (let ((url-gateway-method (condition-case () + (require 'ssl) + (error 'tls)))) + (,(intern (format (if method "url-http-%s" "url-http") method)) + ,@(remove '&rest (remove '&optional args)))))) (url-https-create-secure-wrapper nil (url callback cbargs)) (url-https-create-secure-wrapper file-exists-p (url)) diff --git a/lisp/url/url-ldap.el b/lisp/url/url-ldap.el index 27cbb8ad1e3..24a3ade4922 100644 --- a/lisp/url/url-ldap.el +++ b/lisp/url/url-ldap.el @@ -28,6 +28,7 @@ (require 'url-parse) (require 'url-util) (require 'ldap) +(autoload 'tls-certificate-information "tls") ;; This has been implemented from RFC2255 'The LDAP URL Format' (Dec 1997) ;; @@ -96,7 +97,8 @@ (require 'ssl) (error nil)) (let ((vals (if (fboundp 'ssl-certificate-information) - (ssl-certificate-information data)))) + (ssl-certificate-information data) + (tls-certificate-information data)))) (if (not vals) "Unable to parse certificate" (concat "