emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bad usage of pgg-gpg-* functions in allout.el


From: Daiki Ueno
Subject: Bad usage of pgg-gpg-* functions in allout.el
Date: Fri, 07 Apr 2006 18:43:27 +0900
User-agent: T-gnus/6.17.2 (based on No Gnus v0.2) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (Sanjō) APEL/10.6 MULE XEmacs/21.4 (patch 17) (Jumbo Shrimp) (i686-pc-linux)

>>>>> In <address@hidden> 
>>>>>   Daiki Ueno <address@hidden> wrote:
> >>>>> In <address@hidden> 
> >>>>> "Ken Manheimer" <address@hidden> wrote:
> > thank you!  allout's encryption seems to be working with your reversion.

> Aside from the reversion of pgg-gpg.el, when I looked into allout.el's
> encryption stuff, I found that 4 undocumented non-interface functions
> of pgg-gpg are used:

> pgg-gpg-lookup-key-owner

> pgg-gpg-lookup-key-owner needs to be implemented as an interface
> function.  I'm now working on this.

>>>>> In <address@hidden> 
>>>>>   Daiki Ueno <address@hidden> wrote:
> Patch from Gnus' trunk is attached.  Major changes are listed below.

> * Added new interface function pgg-list-keys.  This function returns
> more information about keys than pgg-lookup-key.  For example:

With this function, a function which does the same thing as
pgg-gpg-lookup-key-owner can be implemented.

(defun allout-lookup-key-owner (string &optional all)
  "Search keys associated with STRING and return owner of identified key.

The value may be just the bare key id, or it may be a combination of the
user name associated with the key and the key id, with the key id enclosed
in \"<...>\" angle brackets.

Optional ALL non-nil means search all keys, including secret keys."
  (let ((keys (pgg-gpg-list-keys string all))
        entry)
    (while keys
      (setq entry (assq 'user-id (assq 'uid (car keys))))
      (if entry
          (setq keys nil)
        (setq keys (cdr keys))))
    (cdr entry)))

(allout-lookup-key-owner "ueno")
=> "Daiki Ueno <address@hidden>"

Regards,
-- 
Daiki Ueno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]