* lisp/epa-file.el (epa-file-write-region): Use it to select a
non-revoked key (bug#22359).
* lisp/epg.el (epg--filter-revoked-keys): New function.
If no one is selected, symmetric encryption will be performed. "
recipients)
(if epa-file-encrypt-to
- (epg-list-keys context recipients)))))
+ (epg--filter-revoked-keys
+ (epg-list-keys context recipients))))))
(error
(epa-display-error context)
(if (setq entry (assoc file epa-file-passphrase-alist))
(setq pointer (cdr pointer)))
keys))
+(defun epg--filter-revoked-keys (keys)
+ (seq-remove (lambda (key)
+ (seq-find (lambda (user)
+ (eq (epg-user-id-validity user) 'revoked))
+ (epg-key-user-id-list key)))
+ keys))
+
(defun epg--args-from-sig-notations (notations)
(apply #'nconc
(mapcar