(when passphrase
(let ((password-cache-expiry (mml-secure-cache-expiry-interval
(epg-context-protocol context))))
+ ;; FIXME test passphrase works before caching it.
(password-cache-add password-cache-key-id passphrase))
(mml-secure-add-secret-key-id password-cache-key-id)
(copy-sequence passphrase)))))
"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)))
auth-passwd))))
;; Try the password cache.
(let ((password (password-read pw-prompt key)))
+ ;; FIXME test password works before caching it.
(password-cache-add key password)
password)
;; Else, get the password interactively.