From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Gnus NoCeM and EasyPG
Date: Tue, 17 Feb 2009 10:37:04 +0900 [thread overview]
Message-ID: <b4m8wo5g7y7.fsf@jpl.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
Hi,
gnus-nocem.el still uses PGG. Isn't it better to use EasyPG by
default? The patch I've already verified is below. To use this,
set `gnus-use-nocem' to t, or the number of group level that you
have set to nntp groups. Cf. (info "(gnus)NoCeM")
2009-02-17 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-nocem.el (gnus-nocem-groups): Remove invalid NoCeM groups.
(gnus-nocem-issuers): List currently active issuers.
(gnus-nocem-verifyer): Default to gnus-nocem-epg-verify.
(gnus-nocem-epg-verify): New function.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2352 bytes --]
--- 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
next reply other threads:[~2009-02-17 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 1:37 Katsumi Yamaoka [this message]
2009-02-17 8:12 ` Leo
2009-02-17 23:24 ` Reiner Steib
2009-02-17 23:36 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4m8wo5g7y7.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).