Mercurial > emacs
annotate lisp/url/url-https.el @ 72130:c7889d24e9d7
(ispell-word): If we replace the word, move point to the end.
Insert before deleting.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 26 Jul 2006 17:11:07 +0000 |
parents | e8a3fb527b77 |
children | d04d8ccb3c41 |
rev | line source |
---|---|
57449
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
1 ;;; url-https.el --- HTTP over SSL/TLS routines |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
2 |
68640
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64748
diff
changeset
|
3 ;; Copyright (C) 1999, 2004, 2005, 2006 Free Software Foundation, Inc. |
54933
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 |
64084 | 21 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
22 ;; Boston, MA 02110-1301, USA. | |
54933
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) | |
57449
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
33 (require 'tls) |
54695 | 34 |
35 (defconst url-https-default-port 443 "Default HTTPS port.") | |
36 (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") | |
37 (defalias 'url-https-expand-file-name 'url-http-expand-file-name) | |
38 | |
39 (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
|
40 `(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
|
41 ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) |
57449
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
42 (let ((url-gateway-method (condition-case () |
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
43 (require 'ssl) |
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
44 (error 'tls)))) |
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
45 (,(intern (format (if method "url-http-%s" "url-http") method)) |
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
46 ,@(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 |