aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/url/url-https.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/url/url-https.el')
-rw-r--r--lisp/url/url-https.el14
1 files changed, 7 insertions, 7 deletions
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 @@
1;;; url-https.el --- HTTP over SSL routines 1;;; url-https.el --- HTTP over SSL/TLS routines
2 2
3;; Copyright (c) 1999, 2004 Free Software Foundation, Inc. 3;; Copyright (c) 1999, 2004 Free Software Foundation, Inc.
4 4
@@ -30,6 +30,7 @@
30(require 'url-parse) 30(require 'url-parse)
31(require 'url-cookie) 31(require 'url-cookie)
32(require 'url-http) 32(require 'url-http)
33(require 'tls)
33 34
34(defconst url-https-default-port 443 "Default HTTPS port.") 35(defconst url-https-default-port 443 "Default HTTPS port.")
35(defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") 36(defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.")
@@ -38,12 +39,11 @@
38(defmacro url-https-create-secure-wrapper (method args) 39(defmacro url-https-create-secure-wrapper (method args)
39 `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args 40 `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args
40 ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) 41 ,(format "HTTPS wrapper around `%s' call." (or method "url-http"))
41 (condition-case () 42 (let ((url-gateway-method (condition-case ()
42 (require 'ssl) 43 (require 'ssl)
43 (error 44 (error 'tls))))
44 (error "HTTPS support could not find `ssl' library"))) 45 (,(intern (format (if method "url-http-%s" "url-http") method))
45 (let ((url-gateway-method 'ssl)) 46 ,@(remove '&rest (remove '&optional args))))))
46 ( ,(intern (format (if method "url-http-%s" "url-http") method)) ,@(remove '&rest (remove '&optional args))))))
47 47
48(url-https-create-secure-wrapper nil (url callback cbargs)) 48(url-https-create-secure-wrapper nil (url callback cbargs))
49(url-https-create-secure-wrapper file-exists-p (url)) 49(url-https-create-secure-wrapper file-exists-p (url))