(delete-window (get-buffer-window epa-keys-buffer)))
(kill-buffer epa-keys-buffer))))
-(defun epa--format-seconds (seconds)
- (let ((number-seconds (string-to-number (concat seconds ".0"))))
- (format-time-string "%Y-%m-%d"
- (cons (floor (/ number-seconds 65536))
- (floor (mod number-seconds 65536))))))
-
(defun epa-show-key (key)
(let* ((primary-sub-key (car (epg-key-sub-key-list key)))
(entry (assoc (epg-sub-key-id primary-sub-key)
(cdr (assq (epg-sub-key-algorithm (car pointer))
epg-pubkey-algorithm-alist))
"\n\tCreated: "
- (epa--format-seconds (epg-sub-key-creation-time (car pointer)))
+ (format-time-string "%Y-%m-%d"
+ (epg-sub-key-creation-time (car pointer)))
(if (epg-sub-key-expiration-time (car pointer))
(format "\n\tExpires: %s"
- (epa--format-seconds (epg-sub-key-expiration-time
- (car pointer))))
+ (format-time-string "%Y-%m-%d"
+ (epg-sub-key-expiration-time
+ (car pointer))))
"")
"\n\tCapabilities: "
(mapconcat #'symbol-name
(equal (epg-signature-key-id signature) string))
(epg-signature-set-status signature 'no-pubkey))))
+(defun epg--time-from-seconds (seconds)
+ (let ((number-seconds (string-to-number (concat seconds ".0"))))
+ (cons (floor (/ number-seconds 65536))
+ (floor (mod number-seconds 65536)))))
+
(defun epg--status-ERRSIG (context string)
(if (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \
\\([0-9A-Fa-f][0-9A-Fa-f]\\) \\([^ ]+\\) \\([0-9]+\\)"
(string-to-number (match-string 4 string) 16))
(epg-signature-set-creation-time
signature
- (match-string 5 string)))))
+ (epg--time-from-seconds (match-string 5 string))))))
(defun epg--status-VALIDSIG (context string)
(let ((signature (car (epg-context-result-for context 'verify))))
(match-string 1 string))
(epg-signature-set-creation-time
signature
- (match-string 2 string))
+ (epg--time-from-seconds (match-string 2 string)))
(epg-signature-set-expiration-time
signature
- (match-string 3 string))
+ (epg--time-from-seconds (match-string 3 string)))
(epg-signature-set-version
signature
(string-to-number (match-string 4 string)))
(defun epg--status-KEYEXPIRED (context string)
(epg-context-set-result-for
context 'error
- (cons (list 'key-expired (cons 'expiration-time string))
+ (cons (list 'key-expired (cons 'expiration-time
+ (epg--time-from-seconds string)))
(epg-context-result-for context 'error))))
(defun epg--status-KEYREVOKED (context string)