]> git.eshelyaron.com Git - emacs.git/commitdiff
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-458
authorMiles Bader <miles@gnu.org>
Thu, 30 Jun 2005 00:27:41 +0000 (00:27 +0000)
committerMiles Bader <miles@gnu.org>
Thu, 30 Jun 2005 00:27:41 +0000 (00:27 +0000)
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.

lisp/gnus/ChangeLog
lisp/gnus/gnus-nocem.el
lisp/gnus/pgg.el
man/ChangeLog
man/gnus.texi

index b7698350efb36e84f8bc70f6809c25321d859900..1f305f3adebdaaa1a2cd8074c65a05493a18133f 100644 (file)
@@ -1,3 +1,13 @@
+2005-06-29  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * 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.
+
+       * pgg.el (pgg-verify): Return the verification result.
+
 2005-06-24  Juanma Barranquero  <lekktu@gmail.com>
 
        * gnus-art.el (gnus-article-mode): Set `nobreak-char-display', not
index 5a5f779b732cfc99edd86fddf548b01856938675..cd51efcf100875b2e7215dc8f6e011057f64ef75 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-nocem.el --- NoCeM pseudo-cancellation treatment
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2004
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 
@@ -74,12 +74,13 @@ issuer registry."
   :group 'gnus-nocem
   :type 'integer)
 
-(defcustom gnus-nocem-verifyer 'mc-verify
+(defcustom gnus-nocem-verifyer 'pgg-verify
   "*Function called to verify that the NoCeM message is valid.
-One likely value is `mc-verify'.  If the function in this variable
+One likely value is `pgg-verify'.  If the function in this variable
 isn't bound, the message will be used unconditionally."
   :group 'gnus-nocem
-  :type '(radio (function-item mc-verify)
+  :type '(radio (function-item pgg-verify)
+               (function-item mc-verify)
                (function :tag "other")))
 
 (defcustom gnus-nocem-liberal-fetch nil
@@ -246,7 +247,7 @@ valid issuer, which is much faster if you are selective about the issuers."
        ;; We get the name of the issuer.
        (narrow-to-region b e)
        (setq issuer (mail-fetch-field "issuer")
-             type (mail-fetch-field "issuer"))
+             type (mail-fetch-field "type"))
        (widen)
        (if (not (gnus-nocem-message-wanted-p issuer type))
            (message "invalid NoCeM issuer: %s" issuer)
@@ -267,18 +268,20 @@ valid issuer, which is much faster if you are selective about the issuers."
       (while (setq condition (pop conditions))
        (cond
         ((stringp condition)
-         (setq wanted (string-match condition type)))
+         (when (string-match condition type)
+           (setq wanted t)))
         ((and (consp condition)
               (eq (car condition) 'not)
               (stringp (cadr condition)))
-         (setq wanted (not (string-match (cadr condition) type))))
+         (when (string-match (cadr condition) type)
+           (setq wanted nil)))
         (t
          (error "Invalid NoCeM condition: %S" condition))))
       wanted))))
 
 (defun gnus-nocem-verify-issuer (person)
   "Verify using PGP that the canceler is who she says she is."
-  (if (fboundp gnus-nocem-verifyer)
+  (if (functionp gnus-nocem-verifyer)
       (ignore-errors
        (funcall gnus-nocem-verifyer))
     ;; 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."
            (while (eq (char-after) ?\t)
              (forward-line -1))
            (setq id (buffer-substring (point) (1- (search-forward "\t"))))
-           (unless (gnus-gethash id gnus-nocem-hashtb)
+           (unless (if gnus-nocem-hashtb
+                       (gnus-gethash id gnus-nocem-hashtb)
+                     (setq gnus-nocem-hashtb (gnus-make-hashtable))
+                     nil)
              ;; only store if not already present
              (gnus-sethash id t gnus-nocem-hashtb)
              (push id ncm))
index eff02a1c32ab166edcdca266797bc98cce25ce1b..ca351c90cd22cf47fbc1e16a201bcd35c09e4715 100644 (file)
@@ -380,7 +380,8 @@ within the region."
        (with-output-to-temp-buffer pgg-echo-buffer
          (set-buffer standard-output)
          (insert-buffer-substring (if status pgg-output-buffer
-                                    pgg-errors-buffer)))))))
+                                    pgg-errors-buffer)))))
+    status))
 
 ;;;###autoload
 (defun pgg-insert-key ()
index 6b7327351af36224dedc4df73de080fd69315610..3d75467e2bfff1d80e80332f001e864b5bd1ae3c 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-29  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.texi (NoCeM): gnus-nocem-verifyer defaults to pgg-verify.
+
 2005-06-29  Carsten Dominik  <dominik@science.uva.nl>
 
        * org.texi: Version 3.12
index f386297e9251fe1e1b2d4c025c172428b09b2a0c..b1d5be22651ae72c5562809c866cdd9d3c2b6790 100644 (file)
@@ -21750,27 +21750,18 @@ The specs are applied left-to-right.
 
 @item gnus-nocem-verifyer
 @vindex gnus-nocem-verifyer
-@findex mc-verify
+@findex pgg-verify
 This should be a function for verifying that the NoCeM issuer is who she
-says she is.  The default is @code{mc-verify}, which is a Mailcrypt
-function.  If this is too slow and you don't care for verification
-(which may be dangerous), you can set this variable to @code{nil}.
-
-If you want signed NoCeM messages to be verified and unsigned messages
-not to be verified (but used anyway), you could do something like:
-
-@lisp
-(setq gnus-nocem-verifyer 'my-gnus-mc-verify)
-
-(defun my-gnus-mc-verify ()
-  (not (eq 'forged
-           (ignore-errors
-             (if (mc-verify)
-                 t
-               'forged)))))
-@end lisp
-
-This might be dangerous, though.
+says she is.  The default is @code{pgg-verify}, which returns
+non-@code{nil} if the verification is successful, otherwise (including
+the case the NoCeM message was not signed) returns @code{nil}.  If this
+is too slow and you don't care for verification (which may be dangerous),
+you can set this variable to @code{nil}.
+
+Formerly the default was @code{mc-verify}, which is a Mailcrypt
+function.  While you can still use it, you can change it into
+@code{pgg-verify} running with GnuPG if you are willing to add the
+@acronym{PGP} public keys to GnuPG's keyring.
 
 @item gnus-nocem-directory
 @vindex gnus-nocem-directory