* pgg-def.el (pgg-overriding-user-id): New variable.
* pgg.el (pgg-universal-user-id-argument): New command.
* pgg-gpg.el (pgg-scheme-encrypt-region): Prefer
pgg-overriding-user-id to pgg-gpg-user-id.
(pgg-scheme-decrypt-region): Ditto.
(pgg-scheme-sign-region): Ditto.
(pgg-scheme-insert-key): Ditto.
+2003-08-16 Daiki Ueno <ueno@unixuser.org>
+
+ * Don't autoload S/MIME stuff.
+
+ * pgg-def.el (pgg-overriding-user-id): New variable.
+ * pgg.el (pgg-universal-user-id-argument): New command.
+ * pgg-gpg.el (pgg-scheme-encrypt-region): Prefer
+ pgg-overriding-user-id to pgg-gpg-user-id.
+ (pgg-scheme-decrypt-region): Ditto.
+ (pgg-scheme-sign-region): Ditto.
+ (pgg-scheme-insert-key): Ditto.
+
2003-05-22 Daiki Ueno <ueno@unixuser.org>
* mime-play.el (mime-activate-mailcap-method): Undo the last change.
"PGP verification of current region." t)
(autoload 'pgg-snarf-keys-region "pgg"
"Snarf PGP public keys in current region." t)
-(autoload 'smime-decrypt-buffer "smime"
- "S/MIME decryption of current region.")
-(autoload 'smime-verify-buffer "smime"
- "Verify integrity of S/MIME message in BUFFER.")
-(autoload 'smime-noverify-buffer "smime"
- "Verify integrity of S/MIME message in BUFFER.")
-(autoload 'smime-pkcs7-region "smime"
- "Convert S/MIME message into a PKCS7 message.")
-(autoload 'smime-pkcs7-certificates-region "smime"
- "Extract any certificates enclosed in PKCS7 message.")
-(autoload 'smime-pkcs7-email-region "smime"
- "Get email addresses contained in certificate.")
-(defvar smime-details-buffer)
-(defvar smime-CA-file)
-(defvar smime-CA-directory)
;;; @ Internal method for multipart/signed
;;;
:group 'pgg
:type 'string)
+(defvar pgg-overriding-user-id nil
+ "User ID temporally bound during the command consequent upon
+`pgg-universal-user-id-argument'.")
+
(defcustom pgg-default-keyserver-address "wwwkeys.pgp.net"
"Host name of keyserver."
:group 'pgg
(luna-define-method pgg-scheme-encrypt-region ((scheme pgg-scheme-gpg)
start end recipients)
- (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
+ (let* ((user-id (or pgg-overriding-user-id pgg-gpg-user-id
+ pgg-default-user-id))
(args
`("--batch" "--armor" "--always-trust" "--encrypt"
,@(if recipients
(list "--remote-user" rcpt))
(append recipients
(if pgg-encrypt-for-me
- (list pgg-gpg-user-id)))))))))
+ (list user-id)))))))))
(pgg-as-lbt start end 'CRLF
(pgg-gpg-process-region start end nil pgg-gpg-program args))
(pgg-process-when-success)))
(luna-define-method pgg-scheme-decrypt-region ((scheme pgg-scheme-gpg)
start end)
- (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
+ (let* ((user-id (or pgg-overriding-user-id pgg-gpg-user-id
+ pgg-default-user-id))
(passphrase
(pgg-read-passphrase
(format "GnuPG passphrase for %s: " pgg-gpg-user-id)
- (pgg-scheme-lookup-key scheme pgg-gpg-user-id 'encrypt)))
+ (pgg-scheme-lookup-key scheme user-id 'encrypt)))
(args '("--batch" "--decrypt")))
(pgg-gpg-process-region start end passphrase pgg-gpg-program args)
(with-current-buffer pgg-errors-buffer
(luna-define-method pgg-scheme-sign-region ((scheme pgg-scheme-gpg)
start end &optional cleartext)
- (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
+ (let* ((user-id (or pgg-overriding-user-id pgg-gpg-user-id
+ pgg-default-user-id))
(passphrase
(pgg-read-passphrase
- (format "GnuPG passphrase for %s: " pgg-gpg-user-id)
- (pgg-scheme-lookup-key scheme pgg-gpg-user-id 'sign)))
+ (format "GnuPG passphrase for %s: " user-id)
+ (pgg-scheme-lookup-key scheme user-id 'sign)))
(args
(list (if cleartext "--clearsign" "--detach-sign")
"--armor" "--batch" "--verbose"
- "--local-user" pgg-gpg-user-id))
+ "--local-user" user-id))
(inhibit-read-only t)
buffer-read-only)
(pgg-as-lbt start end 'CRLF
(insert-buffer-substring pgg-errors-buffer)))))
(luna-define-method pgg-scheme-insert-key ((scheme pgg-scheme-gpg))
- (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
- (args (list "--batch" "--export" "--armor"
- pgg-gpg-user-id)))
+ (let* ((user-id (or pgg-overriding-user-id pgg-gpg-user-id
+ pgg-default-user-id))
+ (args (list "--batch" "--export" "--armor" user-id)))
(pgg-gpg-process-region (point)(point) nil pgg-gpg-program args)
(insert-buffer-substring pgg-output-buffer)))
(insert-buffer-substring pgg-output-buffer)
(pgg-snarf-keys-region (point-min)(point-max)))))))
+;;;###autoload
+(defun pgg-universal-user-id-argument ()
+ (interactive)
+ (let* ((pgg-overriding-user-id (read-string "User ID: "))
+ (command (key-binding (read-key-sequence
+ (format "Command to execute on \"%s\":"
+ pgg-overriding-user-id)))))
+ (message "")
+ (call-interactively command)))
(provide 'pgg)