(if (and process (eq 'run (process-status process)))
(interrupt-process process)))))
-(luna-define-method pgg-scheme-lookup-key-string ((scheme pgg-scheme-gpg)
- string &optional type)
+(luna-define-method pgg-scheme-lookup-key ((scheme pgg-scheme-gpg)
+ string &optional type)
(let ((args (list "--with-colons" "--no-greeting" "--batch"
(if type "--list-secret-keys" "--list-keys")
string)))
- (with-current-buffer pgg-output-buffer
+ (with-current-buffer (get-buffer-create pgg-output-buffer)
(buffer-disable-undo)
(erase-buffer)
(apply #'call-process pgg-gpg-program nil t nil args)
(passphrase
(pgg-read-passphrase
(format "GnuPG passphrase for %s: " pgg-gpg-user-id)
- (luna-send scheme 'lookup-key-string
- scheme pgg-gpg-user-id 'encrypt)))
+ (pgg-scheme-lookup-key scheme pgg-gpg-user-id 'encrypt)))
(args '("--batch" "--decrypt")))
(pgg-gpg-process-region start end passphrase pgg-gpg-program args)
(pgg-process-when-success nil)))
(passphrase
(pgg-read-passphrase
(format "GnuPG passphrase for %s: " pgg-gpg-user-id)
- (luna-send scheme 'lookup-key-string
- scheme pgg-gpg-user-id 'sign)))
+ (pgg-scheme-lookup-key scheme pgg-gpg-user-id 'sign)))
(args
(list (if cleartext "--clearsign" "--detach-sign")
"--armor" "--batch" "--verbose"
(if (and process (eq 'run (process-status process)))
(interrupt-process process)))))
-(luna-define-method pgg-scheme-lookup-key-string ((scheme pgg-scheme-pgp)
+(luna-define-method pgg-scheme-lookup-key ((scheme pgg-scheme-pgp)
string &optional type)
(let ((args (list "+batchmode" "+language=en" "-kv" string)))
(with-current-buffer (get-buffer-create pgg-output-buffer)
(passphrase
(pgg-read-passphrase
(format "PGP passphrase for %s: " pgg-pgp-user-id)
- (luna-send scheme 'lookup-key-string
- scheme pgg-pgp-user-id 'encrypt)))
+ (pgg-scheme-lookup-key scheme pgg-pgp-user-id 'encrypt)))
(args
'("+verbose=1" "+batchmode" "+language=us" "-f")))
(pgg-pgp-process-region start end passphrase pgg-pgp-program args)
(passphrase
(pgg-read-passphrase
(format "PGP passphrase for %s: " pgg-pgp-user-id)
- (luna-send scheme 'lookup-key-string
- scheme pgg-pgp-user-id 'sign)))
+ (pgg-scheme-lookup-key scheme pgg-pgp-user-id 'sign)))
(args
(list (if clearsign "-fast" "-fbast")
"+verbose=1" "+language=us" "+batchmode"
(if (and process (eq 'run (process-status process)))
(interrupt-process process)))))
-(luna-define-method pgg-scheme-lookup-key-string ((scheme pgg-scheme-pgp5)
+(luna-define-method pgg-scheme-lookup-key ((scheme pgg-scheme-pgp5)
string &optional type)
(let ((args (list "+language=en" "-l" string)))
(with-current-buffer (get-buffer-create pgg-output-buffer)
(passphrase
(pgg-read-passphrase
(format "PGP passphrase for %s: " pgg-pgp5-user-id)
- (luna-send scheme 'lookup-key-string
- scheme pgg-pgp5-user-id 'encrypt)))
+ (pgg-scheme-lookup-key scheme pgg-pgp5-user-id 'encrypt)))
(args
'("+verbose=1" "+batchmode=1" "+language=us" "-f")))
(pgg-pgp5-process-region start end passphrase pgg-pgp5-pgpv-program args)
(passphrase
(pgg-read-passphrase
(format "PGP passphrase for %s: " pgg-pgp5-user-id)
- (luna-send scheme 'lookup-key-string
- scheme pgg-pgp5-user-id 'sign)))
+ (pgg-scheme-lookup-key scheme pgg-pgp5-user-id 'sign)))
(args
(list (if clearsign "-fat" "-fbat")
"+verbose=1" "+language=us" "+batchmode=1"
(luna-define-internal-accessors 'pgg-scheme))
-(luna-define-generic pgg-scheme-lookup-key-string
- (scheme string &optional type)
+(luna-define-generic pgg-scheme-lookup-key (scheme string &optional type)
"Search keys associated with STRING")
(luna-define-generic pgg-scheme-encrypt-region (scheme start end recipients)
(and (stringp key)
(setq key (concat "0x" (pgg-truncate-key-identifier key)))
(null (let ((pgg-scheme scheme))
- (pgg-lookup-key-string key)))
+ (pgg-lookup-key key)))
(or fetch (interactive-p))
(y-or-n-p (format "Key %s not found; attempt to fetch? " key))
(setq keyserver
(pgg-save-coding-system start end
(pgg-scheme-snarf-keys-region entity start end))))
-(defun pgg-lookup-key-string (string &optional type)
+(defun pgg-lookup-key (string &optional type)
(let ((entity (pgg-make-scheme (or pgg-scheme pgg-default-scheme))))
- (pgg-scheme-lookup-key-string entity string type)))
+ (pgg-scheme-lookup-key entity string type)))
(defvar pgg-insert-url-function (function pgg-insert-url-with-w3))