Function: message-all-epg-keys-available-p

message-all-epg-keys-available-p is a byte-compiled function defined in message.el.gz.

Signature

(message-all-epg-keys-available-p)

Documentation

Return non-nil if the pgp keyring has a public key for each recipient.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-all-epg-keys-available-p ()
  "Return non-nil if the pgp keyring has a public key for each recipient."
  (require 'epa)
  (let ((context (epg-make-context epa-protocol)))
    (catch 'break
      (dolist (recipient (message-all-recipients))
        (let ((recipient-email (cadr recipient)))
          (when (and recipient-email (not (epg-list-keys context recipient-email)))
            (throw 'break nil))))
      t)))