Function: smime-encrypt-buffer

smime-encrypt-buffer is an interactive and byte-compiled function defined in smime.el.gz.

Signature

(smime-encrypt-buffer &optional CERTFILES BUFFER)

Documentation

S/MIME encrypt BUFFER for recipients specified in CERTFILES.

CERTFILES is a list of filenames, each file is expected to consist of a PEM encoded key and certificate. Uses current buffer if BUFFER is nil.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/smime.el.gz
(defun smime-encrypt-buffer (&optional certfiles buffer)
  "S/MIME encrypt BUFFER for recipients specified in CERTFILES.
CERTFILES is a list of filenames, each file is expected to consist of
a PEM encoded key and certificate.  Uses current buffer if BUFFER is
nil."
  (interactive)
  (with-current-buffer (or buffer (current-buffer))
    (unless (smime-encrypt-region
	     (point-min) (point-max)
	     (or certfiles
		 (list (read-file-name "Recipient's S/MIME certificate: "
				       smime-certificate-directory nil))))
      (error "Encryption failed"))))