From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75327 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: How do I configure a CA? Date: Mon, 20 Dec 2010 20:50:11 +0100 Message-ID: <87sjxsusuk.fsf@randomsample.de> References: <8739pseujz.fsf@member.fsf.org> <87wrn4bcm6.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1292874684 15632 80.91.229.12 (20 Dec 2010 19:51:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Dec 2010 19:51:24 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23679@lists.math.uh.edu Mon Dec 20 20:51:20 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PUllO-0005kA-V1 for ding-account@gmane.org; Mon, 20 Dec 2010 20:51:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PUlky-0002mW-Sh; Mon, 20 Dec 2010 13:50:52 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PUlkv-0002mH-WC for ding@lists.math.uh.edu; Mon, 20 Dec 2010 13:50:50 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PUlkt-0003mo-Uz for ding@lists.math.uh.edu; Mon, 20 Dec 2010 13:50:49 -0600 Original-Received: from v3-1008.vxen.de ([79.140.41.8]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PUlks-0007m8-Ov for ding@gnus.org; Mon, 20 Dec 2010 20:50:46 +0100 Original-Received: from dslc-082-083-032-157.pools.arcor-ip.net ([82.83.32.157] helo=spaten) by v3-1008.vxen.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1PUlkr-0001aE-Sr for ding@gnus.org; Mon, 20 Dec 2010 20:50:46 +0100 In-Reply-To: <87wrn4bcm6.fsf@member.fsf.org> (Tassilo Horn's message of "Mon, 20 Dec 2010 18:03:29 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) Mail-Copies-To: never Mail-Followup-To: ding@gnus.org X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:75327 Archived-At: --=-=-= Content-Type: text/plain Tassilo Horn writes: > David Engster writes: > > Hi David, > > ok, if OpenSSL is too much a hassle and EPA is better anyways, I won't > try that out. :-) > >>> configure and is supported through the excellent EPG. I've posted a >>> patch to enable S/MIME decryption through EPG a while ago; see >>> >>> http://thread.gmane.org/gmane.emacs.gnus.general/69837/focus=69845 >> >> Erm, the patch is here: >> >> http://thread.gmane.org/gmane.emacs.gnus.general/69837/focus=69840 > > Hm, it doesn't apply cleanly agains the current Gnus HEAD. But when I > find some spare time I'll try to setup EPA and apply your patch > manually. I attached an updated version. BTW, Daiki Ueno also wrote a short tutorial on how to setup gpgsm: http://article.gmane.org/gmane.emacs.gnus.general/67400 -David --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=smime-decrypt-epg.patch diff --git a/lisp/mm-view.el b/lisp/mm-view.el index 083781b..f097a2f 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -683,17 +683,23 @@ (defun mm-view-pkcs7-decrypt (handle &optional from) (insert-buffer-substring (mm-handle-buffer handle)) (goto-char (point-min)) - (insert "MIME-Version: 1.0\n") - (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m") - (smime-decrypt-region - (point-min) (point-max) - (if (= (length smime-keys) 1) - (cadar smime-keys) - (smime-get-key-by-email - (gnus-completing-read - "Decipher using key" - smime-keys nil nil nil (car-safe (car-safe smime-keys))))) - from) + (if (eq mml-smime-use 'epg) + ;; Use EPG/gpgsm + (let ((part (base64-decode-string (buffer-string)))) + (erase-buffer) + (insert (epg-decrypt-string (epg-make-context 'CMS) part))) + ;; Use openssl + (insert "MIME-Version: 1.0\n") + (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m") + (smime-decrypt-region + (point-min) (point-max) + (if (= (length smime-keys) 1) + (cadar smime-keys) + (smime-get-key-by-email + (gnus-completing-read + "Decipher using key" + smime-keys nil nil nil (car-safe (car-safe smime-keys))))) + from)) (goto-char (point-min)) (while (search-forward "\r\n" nil t) (replace-match "\n")) --=-=-=--