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 should contain a PEM encoded key and certificate.
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 should contain a PEM encoded key and certificate."
(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"))))