1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* cache.c: Add a few debug outputs.

* protect.c (agent_private_key_type): New.
* agent.h: Add PRIVATE_KEY_ enums.
* findkey.c (agent_key_from_file): Use it to decide whether we
have to unprotect a key.
(unprotect): Cache the passphrase.

* findkey.c (agent_key_from_file,agent_key_available): The key
files do now require a ".key" suffix to make a script's life
easier.
* genkey.c (store_key): Ditto.
This commit is contained in:
Werner Koch 2002-02-01 11:39:06 +00:00
parent 400938f239
commit 30f1b027c0
6 changed files with 118 additions and 16 deletions

View file

@ -40,7 +40,7 @@ store_key (GCRY_SEXP private, const char *passphrase)
char *buf;
size_t len;
unsigned char grip[20];
char hexgrip[41];
char hexgrip[40+4+1];
if ( !gcry_pk_get_keygrip (private, grip) )
{
@ -49,7 +49,7 @@ store_key (GCRY_SEXP private, const char *passphrase)
}
for (i=0; i < 20; i++)
sprintf (hexgrip+2*i, "%02X", grip[i]);
hexgrip[40] = 0;
strcpy (hexgrip+40, ".key");
fname = make_filename (opt.homedir, "private-keys-v1.d", hexgrip, NULL);
if (!access (fname, F_OK))