--- gnus-nocem.el~ 2009-01-22 08:09:02 +0000 +++ gnus-nocem.el 2009-02-17 01:35:52 +0000 @@ -38,18 +38,20 @@ :group 'gnus-score) (defcustom gnus-nocem-groups - '("news.lists.filters" "news.admin.net-abuse.bulletins" - "alt.nocem.misc" "news.admin.net-abuse.announce") + '("news.lists.filters" "alt.nocem.misc") "*List of groups that will be searched for NoCeM messages." :group 'gnus-nocem :type '(repeat (string :tag "Group"))) (defcustom gnus-nocem-issuers - '("AutoMoose-1" ; CancelMoose[tm] - "clewis@ferret.ocunix" ; Chris Lewis - "cosmo.roadkill" - "SpamHippo" - "hweede@snafu.de") + '("Adri Verhoef" + "alba-nocem@albasani.net" + "bleachbot@httrack.com" + "news@arcor-online.net" + "news@uni-berlin.de" + "nocem@arcor.de" + "pgpmoose@killfile.org" + "xjsppl@gmx.de") "*List of NoCeM issuers to pay attention to. This can also be a list of `(ISSUER CONDITION ...)' elements. @@ -71,12 +73,13 @@ :group 'gnus-nocem :type 'integer) -(defcustom gnus-nocem-verifyer 'pgg-verify +(defcustom gnus-nocem-verifyer 'gnus-nocem-epg-verify "*Function called to verify that the NoCeM message is valid. -One likely value is `pgg-verify'. If the function in this variable -isn't bound, the message will be used unconditionally." +One likely value is `gnus-nocem-epg-verify'. If the function in this +variable isn't bound, the message will be used unconditionally." :group 'gnus-nocem - :type '(radio (function-item pgg-verify) + :type '(radio (function-item gnus-nocem-epg-verify) + (function-item pgg-verify) (function-item mc-verify) (function :tag "other"))) @@ -392,6 +395,21 @@ (and gnus-nocem-hashtb (gethash id gnus-nocem-hashtb))) +(autoload 'epg-make-context "epg") +(eval-when-compile + (autoload 'epg-verify-string "epg") + (autoload 'epg-context-result-for "epg") + (autoload 'epg-signature-status "epg")) + +(defun gnus-nocem-epg-verify () + "Return t if EasyPG verifies a signed message in the current buffer." + (let ((context (epg-make-context 'OpenPGP)) + result) + (epg-verify-string context (buffer-string)) + (and (setq result (epg-context-result-for context 'verify)) + (not (cdr result)) + (eq (epg-signature-status (car result)) 'good)))) + (provide 'gnus-nocem) ;; arch-tag: 0e0c74ea-2f8e-4f3e-8fff-09f767c1adef