aboutsummaryrefslogtreecommitdiffstats
path: root/agent/findkey.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-06-27 07:29:29 +0000
committerWerner Koch <[email protected]>2002-06-27 07:29:29 +0000
commit56b049686fccd110a368352ac704a9f0eeed67a8 (patch)
treed01226c73876fa4fe966653e982b65d4ede84046 /agent/findkey.c
parent* import.c (gpgsm_import): Print an STATUS_IMPORTED. (diff)
downloadgnupg-56b049686fccd110a368352ac704a9f0eeed67a8.tar.gz
gnupg-56b049686fccd110a368352ac704a9f0eeed67a8.zip
* Makefile.am (pkglib_PROGRAMS): Put protect-tool there.
* findkey.c (agent_write_private_key,agent_key_from_file) (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant. * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant. * protect-tool.c (store_private_key): New. (import_p12_file): Store the new file if requested. (main): New options --force and --store. * gpg-agent.c (main): Set a global flag when runing detached. * query.c (start_pinentry): Pass the list of FD to keep in the child when not running detached. * call-scd.c (start_scd): Ditto.
Diffstat (limited to 'agent/findkey.c')
-rw-r--r--agent/findkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/agent/findkey.c b/agent/findkey.c
index 3a9dd53b8..fb3b36e4c 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -52,7 +52,7 @@ agent_write_private_key (const unsigned char *grip,
sprintf (hexgrip+2*i, "%02X", grip[i]);
strcpy (hexgrip+40, ".key");
- fname = make_filename (opt.homedir, "private-keys-v1.d", hexgrip, NULL);
+ fname = make_filename (opt.homedir, GNUPG_PRIVATE_KEYS_DIR, hexgrip, NULL);
if (force)
fp = fopen (fname, "wb");
else
@@ -194,7 +194,7 @@ agent_key_from_file (const unsigned char *grip, unsigned char **shadow_info)
sprintf (hexgrip+2*i, "%02X", grip[i]);
strcpy (hexgrip+40, ".key");
- fname = make_filename (opt.homedir, "private-keys-v1.d", hexgrip, NULL);
+ fname = make_filename (opt.homedir, GNUPG_PRIVATE_KEYS_DIR, hexgrip, NULL);
fp = fopen (fname, "rb");
if (!fp)
{
@@ -318,7 +318,7 @@ agent_key_available (const unsigned char *grip)
sprintf (hexgrip+2*i, "%02X", grip[i]);
strcpy (hexgrip+40, ".key");
- fname = make_filename (opt.homedir, "private-keys-v1.d", hexgrip, NULL);
+ fname = make_filename (opt.homedir, GNUPG_PRIVATE_KEYS_DIR, hexgrip, NULL);
i = !access (fname, R_OK)? 0 : -1;
xfree (fname);
return i;