From: Simon Josefsson Date: Tue, 22 Oct 2002 10:01:26 +0000 (+0000) Subject: (pgg-encrypt, pgg-decrypt, pgg-sign, pgg-verify) X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=fb4f4a52e398b0115f9f8e49a093c79faef09a0a;p=gnus (pgg-encrypt, pgg-decrypt, pgg-sign, pgg-verify) (pgg-snarf-keys): Add. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a47a61466..f4e18ab19 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-10-22 Simon Josefsson + + * pgg.el (pgg-encrypt, pgg-decrypt, pgg-sign, pgg-verify) + (pgg-snarf-keys): Add. + 2002-10-22 Katsumi Yamaoka * lpath.el: Fbind bbdb-records. diff --git a/lisp/pgg.el b/lisp/pgg.el index e3611c924..64382e5e8 100644 --- a/lisp/pgg.el +++ b/lisp/pgg.el @@ -168,6 +168,15 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt." (pgg-display-output-buffer start end status)) status)) +;;;###autoload +(defun pgg-encrypt (rcpts &optional sign start end) + "Encrypt the current buffer for RCPTS. +If optional argument SIGN is non-nil, do a combined sign and encrypt. +If optional arguments START and END are specified, only encrypt within +the region." + (interactive (list (split-string (read-string "Recipients: ") "[ \t,]+"))) + (pgg-encrypt-region (or start (point-min)) (or end (point-max)) rcpts sign)) + ;;;###autoload (defun pgg-decrypt-region (start end) "Decrypt the current region between START and END." @@ -190,6 +199,14 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt." (pgg-display-output-buffer start end status)) status)) +;;;###autoload +(defun pgg-decrypt (&optional start end) + "Decrypt the current buffer. +If optional arguments START and END are specified, only decrypt within +the region." + (interactive "") + (pgg-decrypt-region (or start (point-min)) (or end (point-max)))) + ;;;###autoload (defun pgg-sign-region (start end &optional cleartext) "Make the signature from text between START and END. @@ -204,6 +221,16 @@ a detached signature." (pgg-display-output-buffer start end status)) status)) +;;;###autoload +(defun pgg-sign (&optional cleartext start end) + "Sign the current buffer. +If the optional argument CLEARTEXT is non-nil, it does not create a +detached signature. +If optional arguments START and END are specified, only sign data +within the region." + (interactive "") + (pgg-sign-region (or start (point-min)) (or end (point-max)) cleartext)) + ;;;###autoload (defun pgg-verify-region (start end &optional signature fetch) "Verify the current region between START and END. @@ -247,6 +274,19 @@ signer's public key from `pgg-default-keyserver-address'." pgg-errors-buffer))))) status)) +;;;###autoload +(defun pgg-verify (&optional signature fetch start end) + "Verify the current buffer. +If the optional argument SIGNATURE is non-nil, it is treated as +the detached signature of the current region. +If the optional argument FETCH is non-nil, we attempt to fetch the +signer's public key from `pgg-default-keyserver-address'. +If optional arguments START and END are specified, only verify data +within the region." + (interactive "") + (pgg-verify-region (or start (point-min)) (or end (point-max)) + signature fetch)) + ;;;###autoload (defun pgg-insert-key () "Insert the ASCII armored public key." @@ -261,6 +301,12 @@ signer's public key from `pgg-default-keyserver-address'." (pgg-invoke "snarf-keys-region" (or pgg-scheme pgg-default-scheme) start end))) +;;;###autoload +(defun pgg-snarf-keys () + "Import public keys in the current buffer." + (interactive "") + (pgg-snarf-keys-region (or start (point-min)) (or end (point-max)))) + (defun pgg-lookup-key (string &optional type) (pgg-invoke "lookup-key" (or pgg-scheme pgg-default-scheme) string type))