summaryrefslogtreecommitdiff
path: root/lisp/epa-file.el
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2014-11-07 15:12:40 +0900
committerDaiki Ueno <ueno@gnu.org>2014-11-07 15:12:40 +0900
commitb912aed95a7c31b14cb7e07c0287b9ce8f7369e0 (patch)
treeded5d44d12ec1f282d00535d15bf860ad7644eba /lisp/epa-file.el
parent135a9f4b5aead507c030fb7e3e8ad13aaa91f403 (diff)
downloademacs-b912aed95a7c31b14cb7e07c0287b9ce8f7369e0.tar.gz
epg: Utilize --pinentry-mode added in GnuPG 2.1
* epa.el (epa-pinentry-mode): New user option. (epa-sign-file, epa-encrypt-file, epa-decrypt-region) (epa-sign-region, epa-encrypt-region): Respect epa-pinentry-mode. * epa-file.el (epa-file-insert-file-contents) (epa-file-write-region): Respect epa-pinentry-mode.
Diffstat (limited to 'lisp/epa-file.el')
-rw-r--r--lisp/epa-file.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index 759271bc4e8..e70bf6d13df 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -144,6 +144,8 @@ encryption is used."
context
(cons #'epa-progress-callback-function
(format "Decrypting %s" file)))
+ (if epa-pinentry-mode
+ (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
(unwind-protect
(progn
(if replace
@@ -231,6 +233,8 @@ encryption is used."
(cons #'epa-progress-callback-function
(format "Encrypting %s" file)))
(setf (epg-context-armor context) epa-armor)
+ (if epa-pinentry-mode
+ (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
(condition-case error
(setq string
(epg-encrypt-string