Gnus development mailing list
 help / color / mirror / Atom feed
* OpenPGP header
@ 2004-11-14 16:55 Simon Josefsson
  2004-11-14 21:26 ` Steve Youngs
  2004-11-14 22:24 ` Xavier Maillard
  0 siblings, 2 replies; 11+ messages in thread
From: Simon Josefsson @ 2004-11-14 16:55 UTC (permalink / raw)


There is an effort to standardize the features from X-PGP:, X-PGP-ID:
etc into OpenPGP:, see:

http://josefsson.org/openpgp-header/

While general comments are appreciated, what I'd like to ask here is
whether Gnus should try to generate this header automatically?

Note the key word 'try'.

Exactly how Gnus can determine whether the user has a working OpenPGP
installation isn't obvious.  Check whether ~/.gnupg/gpg.conf exists
and use the key id from the 'default-key' token in that file?

OTOH, even if that test succeed, it is not clear that the user wishes
to add the header to all messages she sends.

Perhaps it would be sufficient to make it easy to optionally ask Gnus
to set the header.  Right now I don't think it is simple enough,
here's what I'm using currently:

 '(message-send-hook (quote ((lambda nil (save-excursion (save-restriction (message-narrow-to-headers) (goto-char (point-max)) (insert "OpenPGP: id=B565716F; url=http://josefsson.org/key.txt
")))))))

Perhaps a variable message-insert-openpgp, that is nil by default, but
may contain a list with information to populate in that header?  An
example value would be:

(setq message-insert-openpgp
      '((id . "B565716F") (url . "http://josefsson.org/key.txt")))

What do you think?




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-14 16:55 OpenPGP header Simon Josefsson
@ 2004-11-14 21:26 ` Steve Youngs
  2004-11-14 22:21   ` Xavier Maillard
                     ` (2 more replies)
  2004-11-14 22:24 ` Xavier Maillard
  1 sibling, 3 replies; 11+ messages in thread
From: Steve Youngs @ 2004-11-14 21:26 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]

* Simon Josefsson <jas@extundo.com> writes:

  > There is an effort to standardize the features from X-PGP:,
  > X-PGP-ID: etc into OpenPGP:, see:

  > http://josefsson.org/openpgp-header/

  > While general comments are appreciated, what I'd like to ask here
  > is whether Gnus should try to generate this header automatically?

  > Note the key word 'try'.

Indeed.

  > Exactly how Gnus can determine whether the user has a working OpenPGP
  > installation isn't obvious.  Check whether ~/.gnupg/gpg.conf exists
  > and use the key id from the 'default-key' token in that file?

And if `default-key' isn't set?  You could also take the id from
`pgg-default-user-id'.

  > OTOH, even if that test succeed, it is not clear that the user wishes
  > to add the header to all messages she sends.

And she may even want different OpenPGP: headers for different
messages (business/private).

  > Perhaps it would be sufficient to make it easy to optionally ask Gnus
  > to set the header.  Right now I don't think it is simple enough,

`gnus-posting-styles' of course.

  > What do you think?

Nice idea.  Especially if Gnus can be made to use the header to snarf
the key into the local keyring.

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|                   Te audire no possum.                   |
|             Musa sapientum fixa est in aure.             |
|----------------------------------<steve@youngs.au.com>---|

[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-14 21:26 ` Steve Youngs
@ 2004-11-14 22:21   ` Xavier Maillard
       [not found]   ` <microsoft-free.87d5ygw299.fsf-ZDdsx92XhsQvtab9mdV7tw@public.gmane.org>
  2004-11-14 23:19   ` Simon Josefsson
  2 siblings, 0 replies; 11+ messages in thread
From: Xavier Maillard @ 2004-11-14 22:21 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

On 14 nov 2004, Steve Youngs wrote:

> > Exactly how Gnus can determine whether the user has a working
> > OpenPGP installation isn't obvious. Check whether
> > ~/.gnupg/gpg.conf exists and use the key id from the
> > 'default-key' token in that file?
> 
> And if `default-key' isn't set? You could also take the id from
> `pgg-default-user-id'.

This is exactly what I would have recommended.
 
> > Perhaps it would be sufficient to make it easy to optionally
> > ask Gnus to set the header. Right now I don't think it is
> > simple enough,
> 
> `gnus-posting-styles' of course.

Indeed.
-- 
Xavier Maillard

main(){printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}


[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-14 16:55 OpenPGP header Simon Josefsson
  2004-11-14 21:26 ` Steve Youngs
@ 2004-11-14 22:24 ` Xavier Maillard
  1 sibling, 0 replies; 11+ messages in thread
From: Xavier Maillard @ 2004-11-14 22:24 UTC (permalink / raw)


On 14 nov 2004, Simon Josefsson wrote:

> Perhaps a variable message-insert-openpgp, that is nil by
> default, but may contain a list with information to populate in
> that header? An example value would be:
> 
> (setq message-insert-openpgp
> '((id . "B565716F") (url . "http://josefsson.org/key.txt")))
> 
> What do you think?

Why not just use pgg-* prefix ?
-- 
      Xavier Maillard| "Stand Back! I'm a programmer!"
.0.             zedek@gnu-rox.orgz|
..0             (+33) 326 770 221 |   Webmaster, emacsfr.org
000              PGP : 0x1E028EA5 |    Membre de l' APRIL




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
       [not found]   ` <microsoft-free.87d5ygw299.fsf-ZDdsx92XhsQvtab9mdV7tw@public.gmane.org>
@ 2004-11-14 23:17     ` Jochen Küpper
  2004-11-14 23:48       ` Simon Josefsson
  0 siblings, 1 reply; 11+ messages in thread
From: Jochen Küpper @ 2004-11-14 23:17 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]

Steve Youngs <steve-ZDdsx92XhsQvtab9mdV7tw@public.gmane.org> writes:

> * Simon Josefsson <jas-2g3DOctPbj9BDgjK7y7TUQ@public.gmane.org> writes:
>
>   > There is an effort to standardize the features from X-PGP:,
>   > X-PGP-ID: etc into OpenPGP:, see:

[...]

> Nice idea.  Especially if Gnus can be made to use the header to snarf
> the key into the local keyring.

That should probably be similar to the handling of X-Request-PGP:
,----[.gnus]
| ;; handle X-Request-PGP header
| (add-to-list
|  'gnus-header-button-alist
|  '("^X-Request-PGP:" gnus-button-url-regexp  0 t jk/gnus-handle-request-pgp 0)
|  t)
|
| (defun jk/gnus-handle-request-pgp (url)
|   "Fetch PGP key from URL specified in X-Request-PGP header.
| 
| Posted to gnu.emacs.gnus by Reiner Steib
| (Message-ID: <v9u13sy5u7.fsf-WZbs9ZYJ0ya4nSHvGpykACzlmkwuQ7VwhC4ANOJQIlc@public.gmane.org>)."
|   (with-temp-buffer
|     (mm-url-insert-file-contents-external url)
|     (pgg-snarf-keys-region (point-min) (point-max))))
`----

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-14 21:26 ` Steve Youngs
  2004-11-14 22:21   ` Xavier Maillard
       [not found]   ` <microsoft-free.87d5ygw299.fsf-ZDdsx92XhsQvtab9mdV7tw@public.gmane.org>
@ 2004-11-14 23:19   ` Simon Josefsson
  2004-11-14 23:49     ` Steve Youngs
  2 siblings, 1 reply; 11+ messages in thread
From: Simon Josefsson @ 2004-11-14 23:19 UTC (permalink / raw)


Steve Youngs <steve@youngs.au.com> writes:

>   > Exactly how Gnus can determine whether the user has a working OpenPGP
>   > installation isn't obvious.  Check whether ~/.gnupg/gpg.conf exists
>   > and use the key id from the 'default-key' token in that file?
>
> And if `default-key' isn't set?  You could also take the id from
> `pgg-default-user-id'.

Yes.

>   > OTOH, even if that test succeed, it is not clear that the user wishes
>   > to add the header to all messages she sends.
>
> And she may even want different OpenPGP: headers for different
> messages (business/private).

Right.  So I think it might invade privacy too much to do this
automatically.

If there were some GNOME/GNU standard way for users to let MUAs know
their OpenPGP key, we could use that.  But I'm not aware of any such
mechanisms.

>   > Perhaps it would be sufficient to make it easy to optionally ask Gnus
>   > to set the header.  Right now I don't think it is simple enough,
>
> `gnus-posting-styles' of course.

I don't want to see the header while composing.  Is that possible with
posting styles?

>   > What do you think?
>
> Nice idea.  Especially if Gnus can be made to use the header to snarf
> the key into the local keyring.

Eventually I guess that is a goal.  Either there could be a "Secure
reply" that made sure GnuPG has the key and enabled PGP/MIME, or the
PGP/MIME MML functions could look in the original article and try to
get the key.

But first people will have to start use the OpenPGP header...




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-14 23:17     ` Jochen Küpper
@ 2004-11-14 23:48       ` Simon Josefsson
  0 siblings, 0 replies; 11+ messages in thread
From: Simon Josefsson @ 2004-11-14 23:48 UTC (permalink / raw)


Jochen Küpper <jochen@fhi-berlin.mpg.de> writes:

> Steve Youngs <steve@youngs.au.com> writes:
>
>> * Simon Josefsson <jas@extundo.com> writes:
>>
>>   > There is an effort to standardize the features from X-PGP:,
>>   > X-PGP-ID: etc into OpenPGP:, see:
>
> [...]
>
>> Nice idea.  Especially if Gnus can be made to use the header to snarf
>> the key into the local keyring.
>
> That should probably be similar to the handling of X-Request-PGP:

Good idea.  I installed the following.

If you click on the URL in my OpenPGP: header, ideally you should get
a PGG window with some information.

What do people think?

2004-11-15  Simon Josefsson  <jas@extundo.com>

	* gnus-art.el (gnus-header-button-alist): Handle URLs in OpenPGP:
	headers separately.
	(gnus-button-openpgp): New function, inspired by Jochen Küpper
	<jochen@fhi-berlin.mpg.de>.

Index: gnus-art.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v
retrieving revision 7.62
diff -u -p -r7.62 gnus-art.el
--- gnus-art.el	14 Nov 2004 19:44:26 -0000	7.62
+++ gnus-art.el	14 Nov 2004 23:46:32 -0000
@@ -6301,6 +6301,8 @@ variable it the real callback function."
      0 (>= gnus-button-browse-level 0) browse-url 0)
     ("^[^:]+:" gnus-button-url-regexp
      0 (>= gnus-button-browse-level 0) browse-url 0)
+    ("^OpenPGP:.*url=" gnus-button-url-regexp
+     0 (>= gnus-button-browse-level 0) gnus-button-openpgp 0)
     ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)"
      0 (>= gnus-button-message-level 0) gnus-url-mailto 1)
     ("^[^:]+:" "\\(<\\(url: \\)?\\(nntp\\|news\\):\\([^>\n ]*\\)>\\)"
@@ -6662,6 +6664,13 @@ specified by `gnus-button-alist'."
   (info)
   (Info-directory)
   (Info-menu url))
+
+(defun gnus-button-openpgp (url)
+  "Retrieve and add an OpenPGP key given URL from an OpenPGP header."
+  (with-temp-buffer
+    (mm-url-insert-file-contents-external url)
+    (pgg-snarf-keys-region (point-min) (point-max))
+    (pgg-display-output-buffer nil nil nil)))
 
 (defun gnus-button-message-id (message-id)
   "Fetch MESSAGE-ID."




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-14 23:19   ` Simon Josefsson
@ 2004-11-14 23:49     ` Steve Youngs
  2004-11-14 23:59       ` Simon Josefsson
  0 siblings, 1 reply; 11+ messages in thread
From: Steve Youngs @ 2004-11-14 23:49 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 899 bytes --]

* Simon Josefsson <jas@extundo.com> writes:

  > Steve Youngs <steve@youngs.au.com> writes:
  >> And she may even want different OpenPGP: headers for different
  >> messages (business/private).

  > Right.  So I think it might invade privacy too much to do this
  > automatically.

Most automatic things involving PGP generally are.

  >> > Perhaps it would be sufficient to make it easy to optionally ask Gnus
  >> > to set the header.  Right now I don't think it is simple enough,
  >> 
  >> `gnus-posting-styles' of course.

  > I don't want to see the header while composing.  Is that possible
  > with posting styles?

`message-hidden-headers'


-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|                   Te audire no possum.                   |
|             Musa sapientum fixa est in aure.             |
|----------------------------------<steve@youngs.au.com>---|

[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-14 23:49     ` Steve Youngs
@ 2004-11-14 23:59       ` Simon Josefsson
  2004-11-15  0:40         ` Steve Youngs
  0 siblings, 1 reply; 11+ messages in thread
From: Simon Josefsson @ 2004-11-14 23:59 UTC (permalink / raw)


Steve Youngs <steve@youngs.au.com> writes:

>   >> > Perhaps it would be sufficient to make it easy to optionally ask Gnus
>   >> > to set the header.  Right now I don't think it is simple enough,
>   >> 
>   >> `gnus-posting-styles' of course.
>
>   > I don't want to see the header while composing.  Is that possible
>   > with posting styles?
>
> `message-hidden-headers'

It doesn't seem to work here.  First I fix gnus-posting-styles, and
verify that I get OpenPGP: in new messages.  But after adding ^OpenPGP
to message-hidden-headers, the header disappears completely, and is
not even shown in the SMTP trace buffer of what is actually sent.

Is m-h-h broken?




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-14 23:59       ` Simon Josefsson
@ 2004-11-15  0:40         ` Steve Youngs
  2004-11-16 20:43           ` Simon Josefsson
  0 siblings, 1 reply; 11+ messages in thread
From: Steve Youngs @ 2004-11-15  0:40 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

* Simon Josefsson <jas@extundo.com> writes:

  > Steve Youngs <steve@youngs.au.com> writes:
  >> `message-hidden-headers'

  > It doesn't seem to work here.  First I fix gnus-posting-styles, and
  > verify that I get OpenPGP: in new messages.  But after adding ^OpenPGP
  > to message-hidden-headers, the header disappears completely, and is
  > not even shown in the SMTP trace buffer of what is actually sent.

  > Is m-h-h broken?

Works here.  I use it to hide my X-Face header while composing.

(setq message-hidden-headers "\\(X-\\)?Face")

(in some groups I also add a Face header)

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|                   Te audire no possum.                   |
|             Musa sapientum fixa est in aure.             |
|----------------------------------<steve@youngs.au.com>---|

[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OpenPGP header
  2004-11-15  0:40         ` Steve Youngs
@ 2004-11-16 20:43           ` Simon Josefsson
  0 siblings, 0 replies; 11+ messages in thread
From: Simon Josefsson @ 2004-11-16 20:43 UTC (permalink / raw)


Steve Youngs <steve@youngs.au.com> writes:

> * Simon Josefsson <jas@extundo.com> writes:
>
>   > Steve Youngs <steve@youngs.au.com> writes:
>   >> `message-hidden-headers'
>
>   > It doesn't seem to work here.  First I fix gnus-posting-styles, and
>   > verify that I get OpenPGP: in new messages.  But after adding ^OpenPGP
>   > to message-hidden-headers, the header disappears completely, and is
>   > not even shown in the SMTP trace buffer of what is actually sent.
>
>   > Is m-h-h broken?
>
> Works here.

And now it works here as well.  O well, never mind.

So to recap, I guess there is no need for new functionality when
adding OpenPGP to outgoing headers.  gnus-posting-styles is
sufficient.  Automatically populating the header seem like a bad idea.

For handling incoming OpenPGP headers, the patch inspired by Jochen,
that has been installed, seem like a useful start.  There are more
things Gnus could do when it see OpenPGP headers, but it is not clear
exactly what behavior is useful now.




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-11-16 20:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-14 16:55 OpenPGP header Simon Josefsson
2004-11-14 21:26 ` Steve Youngs
2004-11-14 22:21   ` Xavier Maillard
     [not found]   ` <microsoft-free.87d5ygw299.fsf-ZDdsx92XhsQvtab9mdV7tw@public.gmane.org>
2004-11-14 23:17     ` Jochen Küpper
2004-11-14 23:48       ` Simon Josefsson
2004-11-14 23:19   ` Simon Josefsson
2004-11-14 23:49     ` Steve Youngs
2004-11-14 23:59       ` Simon Josefsson
2004-11-15  0:40         ` Steve Youngs
2004-11-16 20:43           ` Simon Josefsson
2004-11-14 22:24 ` Xavier Maillard

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).