Mercurial > emacs
annotate lisp/url/url-https.el @ 55859:1b12270c8c78
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 30 May 2004 13:35:41 +0000 |
parents | 1ebec6b5e54f |
children | 202c408c174b 625059157bad |
rev | line source |
---|---|
54695 | 1 ;;; url-https.el --- HTTP over SSL routines |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
2 |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
3 ;; Copyright (c) 1999, 2004 Free Software Foundation, Inc. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
4 |
54695 | 5 ;; Keywords: comm, data, processes |
6 | |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
7 ;; This file is part of GNU Emacs. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
8 ;; |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
9 ;; GNU Emacs is free software; you can redistribute it and/or modify |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
10 ;; it under the terms of the GNU General Public License as published by |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
11 ;; the Free Software Foundation; either version 2, or (at your option) |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
12 ;; any later version. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
13 ;; |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
14 ;; GNU Emacs is distributed in the hope that it will be useful, |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
17 ;; GNU General Public License for more details. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
18 ;; |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
19 ;; You should have received a copy of the GNU General Public License |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
22 ;; Boston, MA 02111-1307, USA. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
23 |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
24 ;;; Commentary: |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
25 |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
26 ;;; Code: |
54695 | 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) | |
54798
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
39 `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args |
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
40 ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) |
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
41 (condition-case () |
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
42 (require 'ssl) |
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
43 (error |
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
44 (error "HTTPS support could not find `ssl' library"))) |
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
45 (let ((url-gateway-method 'ssl)) |
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
46 ( ,(intern (format (if method "url-http-%s" "url-http") method)) ,@(remove '&rest (remove '&optional args)))))) |
54695 | 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)) | |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
51 (url-https-create-secure-wrapper file-attributes (url &optional id-format)) |
54695 | 52 |
53 (provide 'url-https) | |
54699 | 54 |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
55 ;; arch-tag: c3645ac5-c248-4d12-ad41-7c4b6f7b6d19 |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
56 ;;; url-https.el ends here |