From 604c8148faa6ed44b77c4a8bac1262aa8bb3d0cc Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 27 Sep 2006 05:53:13 +0000 Subject: [PATCH] * epa.el (epa-decrypt-file): Set passphrase-callback. (epa-sign-file): Ditto. (epa-encrypt-file): Ditto. (epa-decrypt-region): Ditto. (epa-sign-region): Ditto. (epa-encrypt-region): Ditto. (epa-sign-keys): Ditto. --- ChangeLog | 8 ++++++++ epa.el | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8787a39..62d6ab1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2006-09-27 Daiki Ueno + * epa.el (epa-decrypt-file): Set passphrase-callback. + (epa-sign-file): Ditto. + (epa-encrypt-file): Ditto. + (epa-decrypt-region): Ditto. + (epa-sign-region): Ditto. + (epa-encrypt-region): Ditto. + (epa-sign-keys): Ditto. + * epg.el (epg-progress-callback-function): Removed. 2006-09-24 Daiki Ueno diff --git a/epa.el b/epa.el index 4b06f5e..c95f0e1 100644 --- a/epa.el +++ b/epa.el @@ -549,6 +549,8 @@ If ARG is non-nil, mark the current line." (file-name-directory default-name) default-name))) (context (epg-make-context))) + (epg-context-set-passphrase-callback context + #'epa-passphrase-callback-function) (message "Decrypting %s..." (file-name-nondirectory file)) (epg-decrypt-file context file plain) (message "Decrypting %s...done" (file-name-nondirectory file)) @@ -591,6 +593,8 @@ If no one is selected, default secret key is used. " (epg-context-set-armor context epa-armor) (epg-context-set-textmode context epa-textmode) (epg-context-set-signers context signers) + (epg-context-set-passphrase-callback context + #'epa-passphrase-callback-function) (message "Signing %s..." (file-name-nondirectory file)) (epg-sign-file context file signature mode) (message "Signing %s...done" (file-name-nondirectory file)))) @@ -606,6 +610,8 @@ If no one is selected, symmetric encryption will be performed. "))) (context (epg-make-context))) (epg-context-set-armor context epa-armor) (epg-context-set-textmode context epa-textmode) + (epg-context-set-passphrase-callback context + #'epa-passphrase-callback-function) (message "Encrypting %s..." (file-name-nondirectory file)) (epg-encrypt-file context file recipients cipher) (message "Encrypting %s...done" (file-name-nondirectory file)))) @@ -619,6 +625,8 @@ Don't use this command in Lisp programs!" (save-excursion (let ((context (epg-make-context)) plain) + (epg-context-set-passphrase-callback context + #'epa-passphrase-callback-function) (message "Decrypting...") (setq plain (epg-decrypt-string context (buffer-substring start end))) (message "Decrypting...done") @@ -719,6 +727,8 @@ If no one is selected, default secret key is used. " (epg-context-set-armor context epa-armor) (epg-context-set-textmode context epa-textmode) (epg-context-set-signers context signers) + (epg-context-set-passphrase-callback context + #'epa-passphrase-callback-function) (message "Signing...") (setq signature (epg-sign-string context (encode-coding-string @@ -743,6 +753,8 @@ If no one is selected, symmetric encryption will be performed. "))) cipher) (epg-context-set-armor context epa-armor) (epg-context-set-textmode context epa-textmode) + (epg-context-set-passphrase-callback context + #'epa-passphrase-callback-function) (message "Encrypting...") (setq cipher (epg-encrypt-string context (encode-coding-string @@ -815,6 +827,8 @@ If LOCAL is non-nil, the signature is marked as non exportable." (error "No keys selected")) (list keys current-prefix-arg))) (let ((context (epg-make-context))) + (epg-context-set-passphrase-callback context + #'epa-passphrase-callback-function) (message "Signing keys...") (epg-sign-keys context keys local) (message "Signing keys...done"))) -- 1.7.10.4