Mercurial > emacs
comparison lisp/url/url-https.el @ 54695:3fb37923e567
Initial revision
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Sun, 04 Apr 2004 01:21:46 +0000 |
| parents | |
| children | 7784ae10206d |
comparison
equal
deleted
inserted
replaced
| 54694:253149f265f2 | 54695:3fb37923e567 |
|---|---|
| 1 ;;; url-https.el --- HTTP over SSL routines | |
| 2 ;; Author: $Author: wmperry $ | |
| 3 ;; Created: $Date: 2001/11/22 14:32:13 $ | |
| 4 ;; Version: $Revision: 1.3 $ | |
| 5 ;; Keywords: comm, data, processes | |
| 6 | |
| 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| 8 ;;; Copyright (c) 1999 Free Software Foundation, Inc. | |
| 9 ;;; | |
| 10 ;;; This file is part of GNU Emacs. | |
| 11 ;;; | |
| 12 ;;; GNU Emacs is free software; you can redistribute it and/or modify | |
| 13 ;;; it under the terms of the GNU General Public License as published by | |
| 14 ;;; the Free Software Foundation; either version 2, or (at your option) | |
| 15 ;;; any later version. | |
| 16 ;;; | |
| 17 ;;; GNU Emacs is distributed in the hope that it will be useful, | |
| 18 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 ;;; GNU General Public License for more details. | |
| 21 ;;; | |
| 22 ;;; You should have received a copy of the GNU General Public License | |
| 23 ;;; along with GNU Emacs; see the file COPYING. If not, write to the | |
| 24 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 25 ;;; Boston, MA 02111-1307, USA. | |
| 26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| 27 | |
| 28 (require 'url-gw) | |
| 29 (require 'url-util) | |
| 30 (require 'url-parse) | |
| 31 (require 'url-cookie) | |
| 32 (require 'url-http) | |
| 33 | |
| 34 (defconst url-https-default-port 443 "Default HTTPS port.") | |
| 35 (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") | |
| 36 (defalias 'url-https-expand-file-name 'url-http-expand-file-name) | |
| 37 | |
| 38 (defmacro url-https-create-secure-wrapper (method args) | |
| 39 (` (defun (, (intern (format (if method "url-https-%s" "url-https") method))) (, args) | |
| 40 (, (format "HTTPS wrapper around `%s' call." (or method "url-http"))) | |
| 41 (condition-case () | |
| 42 (require 'ssl) | |
| 43 (error | |
| 44 (error "HTTPS support could not find `ssl' library."))) | |
| 45 (let ((url-gateway-method 'ssl)) | |
| 46 ((, (intern (format (if method "url-http-%s" "url-http") method))) (,@ (remove '&rest (remove '&optional args)))))))) | |
| 47 | |
| 48 (url-https-create-secure-wrapper nil (url callback cbargs)) | |
| 49 (url-https-create-secure-wrapper file-exists-p (url)) | |
| 50 (url-https-create-secure-wrapper file-readable-p (url)) | |
| 51 (url-https-create-secure-wrapper file-attributes (url)) | |
| 52 | |
| 53 (provide 'url-https) |
