Gnus development mailing list
 help / color / mirror / Atom feed
From: Michael Sperber <sperber@deinprogramm.de>
To: ding@gnus.org
Subject: Encrypt gcc copy with own key
Date: Mon, 25 May 2009 15:10:24 +0200	[thread overview]
Message-ID: <y9l4ov9mipr.fsf@deinprogramm.de> (raw)


I often archive a copy of an encrypted e-mail.  Once upon a time, I
wondered how to do this without encrypting the archive copy with the
recipient's key (which I don't have).  Reiner Steib gave some advice
here:

http://article.gmane.org/gmane.emacs.gnus.general/66847

Somehow, I seem to remember that his idea worked.  Looking back at my
archived copies, however, they are all un-decryptable.  Tracing through
the code, it's clear the gcc copy is explicitly encrypted using the
recipient's key.  So I think there's ultimately a bug somewhere.  I did
this to fix it:

Index: lisp/gnus-msg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-msg.el,v
retrieving revision 7.72
diff -u -r7.72 gnus-msg.el
--- lisp/gnus-msg.el	22 Jan 2009 07:02:16 -0000	7.72
+++ lisp/gnus-msg.el	21 May 2009 12:11:07 -0000
@@ -1636,7 +1636,9 @@
 	    (save-excursion
 	      (nnheader-set-temp-buffer " *acc*")
 	      (insert-buffer-substring cur)
-	      (message-encode-message-body)
+	      (let ((message-options message-options))
+		(message-options-set 'message-recipients user-mail-address)
+		(message-encode-message-body))
 	      (save-restriction
 		(message-narrow-to-headers)
 		(let* ((mail-parse-charset message-default-charset)
Index: lisp/mml2015.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/mml2015.el,v
retrieving revision 7.57
diff -u -r7.57 mml2015.el
--- lisp/mml2015.el	22 Jan 2009 07:02:16 -0000	7.57
+++ lisp/mml2015.el	21 May 2009 12:11:07 -0000
@@ -1291,7 +1291,8 @@
 		     recipients)))
 	(unless recipients
 	  (error "No recipient specified")))
-      (message-options-set 'mml2015-epg-recipients recipients))
+      ;(message-options-set 'mml2015-epg-recipients recipients)
+      )
     (when sign
       (setq signers
 	    (or (message-options-get 'mml2015-epg-signers)

Is this the way to do it?  Comments appreciated!

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla




             reply	other threads:[~2009-05-25 13:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25 13:10 Michael Sperber [this message]
2009-05-25 22:10 ` Daiki Ueno
2009-05-28 10:39   ` Michael Sperber
2009-05-28 11:02     ` Daiki Ueno
2009-06-04  8:19       ` Michael Sperber

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=y9l4ov9mipr.fsf@deinprogramm.de \
    --to=sperber@deinprogramm.de \
    --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).