From 249c729b1a3306f9216e8ae734efb5f75ff233bd Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 20 Dec 2006 05:29:43 +0000 Subject: [PATCH] * epa.el (epa-sign-file): Save the output to *.p7s or *.p7m file if epa-protocol is CMS. (epa-encrypt-file): Ditto. --- ChangeLog | 3 +++ epa.el | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a22aa1..75fc4f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2006-12-20 Daiki Ueno * epa.el (epa-list-keys): Abolished PROTOCOL arg. + (epa-sign-file): Save the output to *.p7s or *.p7m file if + epa-protocol is CMS. + (epa-encrypt-file): Ditto. 2006-12-19 Daiki Ueno diff --git a/epa.el b/epa.el index b6509db..a88f59b 100644 --- a/epa.el +++ b/epa.el @@ -651,12 +651,17 @@ d - Create a detached signature (t (throw 'done nil)))))))) (let ((signature (concat file - (if (or epa-armor - (not (memq mode '(nil t normal detached)))) - ".asc" + (if (eq epa-protocol 'OpenPGP) + (if (or epa-armor + (not (memq mode + '(nil t normal detached)))) + ".asc" + (if (memq mode '(t detached)) + ".sig" + ".gpg")) (if (memq mode '(t detached)) - ".sig" - ".gpg")))) + ".p7s" + ".p7m")))) (context (epg-make-context epa-protocol))) (epg-context-set-armor context epa-armor) (epg-context-set-textmode context epa-textmode) @@ -678,7 +683,9 @@ d - Create a detached signature (epa-select-keys (epg-make-context epa-protocol) "Select recipients for encryption. If no one is selected, symmetric encryption will be performed. "))) - (let ((cipher (concat file (if epa-armor ".asc" ".gpg"))) + (let ((cipher (concat file (if (eq epa-protocol 'OpenPGP) + (if epa-armor ".asc" ".gpg") + ".p7m"))) (context (epg-make-context epa-protocol))) (epg-context-set-armor context epa-armor) (epg-context-set-textmode context epa-textmode) -- 1.7.10.4