Gnus development mailing list
 help / color / mirror / Atom feed
From: Daiki Ueno <ueno@unixuser.org>
To: Werner Koch <wk@gnupg.org>
Cc: ding@gnus.org
Subject: Re: epg and expired recipient keys
Date: Thu, 01 Mar 2007 07:23:26 +0900	[thread overview]
Message-ID: <a62f61ff-ae93-415e-a50b-93c5679f4409@well-done.deisui.org> (raw)
In-Reply-To: <87zm71f0sl.fsf@wheatstone.g10code.de> (Werner Koch's message of "Mon, 26 Feb 2007 15:31:22 +0100")

>>>>> In <87zm71f0sl.fsf@wheatstone.g10code.de> 
>>>>>	Werner Koch <wk@gnupg.org> wrote:
> > I'm now wondering whether to exclude unusable keys from the key list

> Yes, please do this when encrypting.

Okay, I just installed this in Gnus CVS.  The filter function is

(defun mml2015-epg-find-usable-key (keys usage)
  (catch 'found
    (while keys
      (let ((pointer (epg-key-sub-key-list (car keys))))
        (while pointer
          (if (and (memq usage (epg-sub-key-capability (car pointer)))
                   (not (memq (epg-sub-key-validity (car pointer))
                              '(revoked expired))))
              (throw 'found (car keys)))
          (setq pointer (cdr pointer))))
      (setq keys (cdr keys)))))

Regards,
-- 
Daiki Ueno



  parent reply	other threads:[~2007-02-28 22:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 13:02 Michael Piotrowski
2007-02-24 16:00 ` Werner Koch
2007-02-26 10:37   ` Michael Piotrowski
     [not found]   ` <smutzxbtsam.fsf@linuxpal.mit.edu>
2007-02-26 12:23     ` Werner Koch
2007-02-26 12:49       ` Daiki Ueno
2007-02-26 14:31         ` Werner Koch
2007-02-27 11:23           ` Michael Piotrowski
2007-02-28 22:23           ` Daiki Ueno [this message]
2007-03-06  2:19             ` Wolfram Fenske
2007-03-06  4:29               ` Katsumi Yamaoka
2007-03-06  9:41                 ` Wolfram Fenske
2007-03-07 19:19                 ` Miles Bader
2007-03-07 19:25                   ` Miles Bader
2007-03-08  1:06                     ` dolist vs. while-loop (was Re: epg and expired recipient keys) Katsumi Yamaoka
2007-03-08 14:55                       ` Miles Bader
2007-03-06  4:40               ` epg and expired recipient keys Daiki Ueno
2007-03-06  9:37                 ` Wolfram Fenske

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=a62f61ff-ae93-415e-a50b-93c5679f4409@well-done.deisui.org \
    --to=ueno@unixuser.org \
    --cc=ding@gnus.org \
    --cc=wk@gnupg.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).