Gnus development mailing list
 help / color / mirror / Atom feed
* Encrypt gcc copy with own key
@ 2009-05-25 13:10 Michael Sperber
  2009-05-25 22:10 ` Daiki Ueno
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Sperber @ 2009-05-25 13:10 UTC (permalink / raw)
  To: ding


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




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

end of thread, other threads:[~2009-06-04  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-25 13:10 Encrypt gcc copy with own key Michael Sperber
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

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