Function: smime-ask-passphrase

smime-ask-passphrase is a byte-compiled function defined in smime.el.gz.

Signature

(smime-ask-passphrase &optional CACHE-KEY)

Documentation

Asks the passphrase to unlock the secret key.

If cache-key and password-cache is non-nil then cache the password under cache-key.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/smime.el.gz
(defun smime-ask-passphrase (&optional cache-key)
  "Asks the passphrase to unlock the secret key.
If `cache-key' and `password-cache' is non-nil then cache the
password under `cache-key'."
  (let ((passphrase
	 (password-read
	  "Passphrase for secret key (RET for no passphrase): " cache-key)))
    (if (string= passphrase "")
	nil
      ;; FIXME test passphrase works before caching it.
      (and passphrase cache-key (password-cache-add cache-key passphrase))
      passphrase)))