Function: smime-sign-buffer
smime-sign-buffer is an interactive and byte-compiled function defined
in smime.el.gz.
Signature
(smime-sign-buffer &optional KEYFILE BUFFER)
Documentation
S/MIME sign BUFFER with key in KEYFILE.
KEYFILE is expected to contain a PEM encoded private key and certificate as its car, and a list of additional certificates to include in its cadr. If no additional certificates are included, KEYFILE may be the file containing the PEM encoded private key and certificate itself.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/smime.el.gz
;; Sign+encrypt buffer
(defun smime-sign-buffer (&optional keyfile buffer)
"S/MIME sign BUFFER with key in KEYFILE.
KEYFILE is expected to contain a PEM encoded private key and certificate
as its car, and a list of additional certificates to include in its
cadr. If no additional certificates are included, KEYFILE may be the
file containing the PEM encoded private key and certificate itself."
(interactive)
(with-current-buffer (or buffer (current-buffer))
(unless (smime-sign-region
(point-min) (point-max)
(if keyfile
keyfile
(smime-get-key-with-certs-by-email
(gnus-completing-read
"Sign using key"
smime-keys nil (car-safe (car-safe smime-keys))))))
(error "Signing failed"))))