2006-09-02 Daiki Ueno <ueno@unixuser.org>
+ * epg.el (epg-check-configuration): New function.
+
* pgg-epg.el (pgg-epg-lookup-key): New function.
2006-07-29 Daiki Ueno <ueno@unixuser.org>
handback)
(message "%s: %d%%/%d%%" what current total))
+;;;###autoload
(defun epg-configuration ()
"Return a list of internal configuration parameters of `epg-gpg-program'."
(let (config type)
config))))
config))
+;;;###autoload
+(defun epg-check-configuration (configuration)
+ "Verify that CONFIGURATION is sufficient."
+ (let ((entry (assq 'version configuration))
+ major minor teeny)
+ (unless (and entry
+ (stringp (cdr entry))
+ (string-match "\\`\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)"
+ (cdr entry)))
+ (error "Undetermined version: %S" entry))
+ (setq major (string-to-number (match-string 1 (cdr entry)))
+ minor (string-to-number (match-string 2 (cdr entry)))
+ teeny (string-to-number (match-string 3 (cdr entry))))
+ (unless (or (> major 1)
+ (and (= major 1)
+ (or (> minor 4)
+ (and (= minor 4)
+ (>= teeny 3)))))
+ (error "Unsupported version: %s" version))))
+
(defun epg--list-keys-1 (context name mode)
(let ((args (append (list "--with-colons" "--no-greeting" "--batch"
"--with-fingerprint"