diff options
| author | Miles Bader | 2005-06-30 00:27:41 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-06-30 00:27:41 +0000 |
| commit | 84861437f914ac45c1eea7b6477ffc4783bb3bdd (patch) | |
| tree | b4656cb1585c585d93178d9dac777a015652e118 | |
| parent | 0684376b791ef5fc652893d45c4866eac89268ec (diff) | |
| download | emacs-84861437f914ac45c1eea7b6477ffc4783bb3bdd.tar.gz emacs-84861437f914ac45c1eea7b6477ffc4783bb3bdd.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-458
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 83-85)
- Merge from emacs--cvs-trunk--0
- Update from CVS
2005-06-29 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-nocem.el (gnus-nocem-verifyer): Default to pgg-verify.
(gnus-nocem-check-article): Fetch the Type header.
(gnus-nocem-message-wanted-p): Fix the way to examine types.
(gnus-nocem-verify-issuer): Use functionp instead of fboundp.
(gnus-nocem-enter-article): Make sure gnus-nocem-hashtb is initialized.
* lisp/gnus/pgg.el (pgg-verify): Return the verification result.
2005-06-29 Katsumi Yamaoka <yamaoka@jpl.org>
* man/gnus.texi (NoCeM): gnus-nocem-verifyer defaults to pgg-verify.
| -rw-r--r-- | lisp/gnus/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/gnus/gnus-nocem.el | 24 | ||||
| -rw-r--r-- | lisp/gnus/pgg.el | 3 | ||||
| -rw-r--r-- | man/ChangeLog | 4 | ||||
| -rw-r--r-- | man/gnus.texi | 31 |
5 files changed, 42 insertions, 30 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index b7698350efb..1f305f3adeb 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2005-06-29 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-nocem.el (gnus-nocem-verifyer): Default to pgg-verify. | ||
| 4 | (gnus-nocem-check-article): Fetch the Type header. | ||
| 5 | (gnus-nocem-message-wanted-p): Fix the way to examine types. | ||
| 6 | (gnus-nocem-verify-issuer): Use functionp instead of fboundp. | ||
| 7 | (gnus-nocem-enter-article): Make sure gnus-nocem-hashtb is initialized. | ||
| 8 | |||
| 9 | * pgg.el (pgg-verify): Return the verification result. | ||
| 10 | |||
| 1 | 2005-06-24 Juanma Barranquero <lekktu@gmail.com> | 11 | 2005-06-24 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 12 | ||
| 3 | * gnus-art.el (gnus-article-mode): Set `nobreak-char-display', not | 13 | * gnus-art.el (gnus-article-mode): Set `nobreak-char-display', not |
diff --git a/lisp/gnus/gnus-nocem.el b/lisp/gnus/gnus-nocem.el index 5a5f779b732..cd51efcf100 100644 --- a/lisp/gnus/gnus-nocem.el +++ b/lisp/gnus/gnus-nocem.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; gnus-nocem.el --- NoCeM pseudo-cancellation treatment | 1 | ;;; gnus-nocem.el --- NoCeM pseudo-cancellation treatment |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2004 | 3 | ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2004, 2005 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | 6 | ||
| @@ -74,12 +74,13 @@ issuer registry." | |||
| 74 | :group 'gnus-nocem | 74 | :group 'gnus-nocem |
| 75 | :type 'integer) | 75 | :type 'integer) |
| 76 | 76 | ||
| 77 | (defcustom gnus-nocem-verifyer 'mc-verify | 77 | (defcustom gnus-nocem-verifyer 'pgg-verify |
| 78 | "*Function called to verify that the NoCeM message is valid. | 78 | "*Function called to verify that the NoCeM message is valid. |
| 79 | One likely value is `mc-verify'. If the function in this variable | 79 | One likely value is `pgg-verify'. If the function in this variable |
| 80 | isn't bound, the message will be used unconditionally." | 80 | isn't bound, the message will be used unconditionally." |
| 81 | :group 'gnus-nocem | 81 | :group 'gnus-nocem |
| 82 | :type '(radio (function-item mc-verify) | 82 | :type '(radio (function-item pgg-verify) |
| 83 | (function-item mc-verify) | ||
| 83 | (function :tag "other"))) | 84 | (function :tag "other"))) |
| 84 | 85 | ||
| 85 | (defcustom gnus-nocem-liberal-fetch nil | 86 | (defcustom gnus-nocem-liberal-fetch nil |
| @@ -246,7 +247,7 @@ valid issuer, which is much faster if you are selective about the issuers." | |||
| 246 | ;; We get the name of the issuer. | 247 | ;; We get the name of the issuer. |
| 247 | (narrow-to-region b e) | 248 | (narrow-to-region b e) |
| 248 | (setq issuer (mail-fetch-field "issuer") | 249 | (setq issuer (mail-fetch-field "issuer") |
| 249 | type (mail-fetch-field "issuer")) | 250 | type (mail-fetch-field "type")) |
| 250 | (widen) | 251 | (widen) |
| 251 | (if (not (gnus-nocem-message-wanted-p issuer type)) | 252 | (if (not (gnus-nocem-message-wanted-p issuer type)) |
| 252 | (message "invalid NoCeM issuer: %s" issuer) | 253 | (message "invalid NoCeM issuer: %s" issuer) |
| @@ -267,18 +268,20 @@ valid issuer, which is much faster if you are selective about the issuers." | |||
| 267 | (while (setq condition (pop conditions)) | 268 | (while (setq condition (pop conditions)) |
| 268 | (cond | 269 | (cond |
| 269 | ((stringp condition) | 270 | ((stringp condition) |
| 270 | (setq wanted (string-match condition type))) | 271 | (when (string-match condition type) |
| 272 | (setq wanted t))) | ||
| 271 | ((and (consp condition) | 273 | ((and (consp condition) |
| 272 | (eq (car condition) 'not) | 274 | (eq (car condition) 'not) |
| 273 | (stringp (cadr condition))) | 275 | (stringp (cadr condition))) |
| 274 | (setq wanted (not (string-match (cadr condition) type)))) | 276 | (when (string-match (cadr condition) type) |
| 277 | (setq wanted nil))) | ||
| 275 | (t | 278 | (t |
| 276 | (error "Invalid NoCeM condition: %S" condition)))) | 279 | (error "Invalid NoCeM condition: %S" condition)))) |
| 277 | wanted)))) | 280 | wanted)))) |
| 278 | 281 | ||
| 279 | (defun gnus-nocem-verify-issuer (person) | 282 | (defun gnus-nocem-verify-issuer (person) |
| 280 | "Verify using PGP that the canceler is who she says she is." | 283 | "Verify using PGP that the canceler is who she says she is." |
| 281 | (if (fboundp gnus-nocem-verifyer) | 284 | (if (functionp gnus-nocem-verifyer) |
| 282 | (ignore-errors | 285 | (ignore-errors |
| 283 | (funcall gnus-nocem-verifyer)) | 286 | (funcall gnus-nocem-verifyer)) |
| 284 | ;; If we don't have Mailcrypt, then we use the message anyway. | 287 | ;; If we don't have Mailcrypt, then we use the message anyway. |
| @@ -315,7 +318,10 @@ valid issuer, which is much faster if you are selective about the issuers." | |||
| 315 | (while (eq (char-after) ?\t) | 318 | (while (eq (char-after) ?\t) |
| 316 | (forward-line -1)) | 319 | (forward-line -1)) |
| 317 | (setq id (buffer-substring (point) (1- (search-forward "\t")))) | 320 | (setq id (buffer-substring (point) (1- (search-forward "\t")))) |
| 318 | (unless (gnus-gethash id gnus-nocem-hashtb) | 321 | (unless (if gnus-nocem-hashtb |
| 322 | (gnus-gethash id gnus-nocem-hashtb) | ||
| 323 | (setq gnus-nocem-hashtb (gnus-make-hashtable)) | ||
| 324 | nil) | ||
| 319 | ;; only store if not already present | 325 | ;; only store if not already present |
| 320 | (gnus-sethash id t gnus-nocem-hashtb) | 326 | (gnus-sethash id t gnus-nocem-hashtb) |
| 321 | (push id ncm)) | 327 | (push id ncm)) |
diff --git a/lisp/gnus/pgg.el b/lisp/gnus/pgg.el index eff02a1c32a..ca351c90cd2 100644 --- a/lisp/gnus/pgg.el +++ b/lisp/gnus/pgg.el | |||
| @@ -380,7 +380,8 @@ within the region." | |||
| 380 | (with-output-to-temp-buffer pgg-echo-buffer | 380 | (with-output-to-temp-buffer pgg-echo-buffer |
| 381 | (set-buffer standard-output) | 381 | (set-buffer standard-output) |
| 382 | (insert-buffer-substring (if status pgg-output-buffer | 382 | (insert-buffer-substring (if status pgg-output-buffer |
| 383 | pgg-errors-buffer))))))) | 383 | pgg-errors-buffer))))) |
| 384 | status)) | ||
| 384 | 385 | ||
| 385 | ;;;###autoload | 386 | ;;;###autoload |
| 386 | (defun pgg-insert-key () | 387 | (defun pgg-insert-key () |
diff --git a/man/ChangeLog b/man/ChangeLog index 6b7327351af..3d75467e2bf 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2005-06-29 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus.texi (NoCeM): gnus-nocem-verifyer defaults to pgg-verify. | ||
| 4 | |||
| 1 | 2005-06-29 Carsten Dominik <dominik@science.uva.nl> | 5 | 2005-06-29 Carsten Dominik <dominik@science.uva.nl> |
| 2 | 6 | ||
| 3 | * org.texi: Version 3.12 | 7 | * org.texi: Version 3.12 |
diff --git a/man/gnus.texi b/man/gnus.texi index f386297e925..b1d5be22651 100644 --- a/man/gnus.texi +++ b/man/gnus.texi | |||
| @@ -21750,27 +21750,18 @@ The specs are applied left-to-right. | |||
| 21750 | 21750 | ||
| 21751 | @item gnus-nocem-verifyer | 21751 | @item gnus-nocem-verifyer |
| 21752 | @vindex gnus-nocem-verifyer | 21752 | @vindex gnus-nocem-verifyer |
| 21753 | @findex mc-verify | 21753 | @findex pgg-verify |
| 21754 | This should be a function for verifying that the NoCeM issuer is who she | 21754 | This should be a function for verifying that the NoCeM issuer is who she |
| 21755 | says she is. The default is @code{mc-verify}, which is a Mailcrypt | 21755 | says she is. The default is @code{pgg-verify}, which returns |
| 21756 | function. If this is too slow and you don't care for verification | 21756 | non-@code{nil} if the verification is successful, otherwise (including |
| 21757 | (which may be dangerous), you can set this variable to @code{nil}. | 21757 | the case the NoCeM message was not signed) returns @code{nil}. If this |
| 21758 | 21758 | is too slow and you don't care for verification (which may be dangerous), | |
| 21759 | If you want signed NoCeM messages to be verified and unsigned messages | 21759 | you can set this variable to @code{nil}. |
| 21760 | not to be verified (but used anyway), you could do something like: | 21760 | |
| 21761 | 21761 | Formerly the default was @code{mc-verify}, which is a Mailcrypt | |
| 21762 | @lisp | 21762 | function. While you can still use it, you can change it into |
| 21763 | (setq gnus-nocem-verifyer 'my-gnus-mc-verify) | 21763 | @code{pgg-verify} running with GnuPG if you are willing to add the |
| 21764 | 21764 | @acronym{PGP} public keys to GnuPG's keyring. | |
| 21765 | (defun my-gnus-mc-verify () | ||
| 21766 | (not (eq 'forged | ||
| 21767 | (ignore-errors | ||
| 21768 | (if (mc-verify) | ||
| 21769 | t | ||
| 21770 | 'forged))))) | ||
| 21771 | @end lisp | ||
| 21772 | |||
| 21773 | This might be dangerous, though. | ||
| 21774 | 21765 | ||
| 21775 | @item gnus-nocem-directory | 21766 | @item gnus-nocem-directory |
| 21776 | @vindex gnus-nocem-directory | 21767 | @vindex gnus-nocem-directory |