2006-09-02 Daiki Ueno <ueno@unixuser.org>
* epg.el (epg-check-configuration): New function.
+ (epg-gpg-home-directory): New user option.
+ (epg-gpgsm-home-directory): New user option.
* pgg-epg.el (pgg-epg-lookup-key): New function.
:group 'epg
:type 'string)
+(defcustom epg-gpg-home-directory nil
+ "The directory which contains the `gpg' configuration files."
+ :group 'epg
+ :type '(choice (const :tag "Default" nil) directory))
+
+(defcustom epg-gpgsm-home-directory nil
+ "The directory which contains the `gpgsm' configuration files."
+ :group 'epg
+ :type '(choice (const :tag "Default" nil) directory))
+
(defconst epg-version-number "0.0.4")
(defvar epg-user-id nil
(if (eq (epg-context-protocol context) 'CMS)
epg-gpgsm-program
epg-gpg-program)))
- (let* ((args (append (list "--no-tty"
+ (let* ((home-directory (if (eq (epg-context-protocol context) 'CMS)
+ epg-gpgsm-home-directory
+ epg-gpg-home-directory))
+ (args (append (list "--no-tty"
"--status-fd" "1"
"--yes")
+ (if home-directory (list "--homedir" home-directory))
(unless (eq (epg-context-protocol context) 'CMS)
(list "--command-fd" "0"))
(if (epg-context-armor context) '("--armor"))