mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
* protect-tool.c (show_file): New. Used as default action.
This commit is contained in:
parent
81a4a2527c
commit
1943ed5d2c
@ -1,3 +1,7 @@
|
|||||||
|
2002-04-05 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* protect-tool.c (show_file): New. Used as default action.
|
||||||
|
|
||||||
2002-03-28 Werner Koch <wk@gnupg.org>
|
2002-03-28 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
|
* divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
|
||||||
|
@ -366,6 +366,29 @@ show_shadow_info (const char *fname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
show_file (const char *fname)
|
||||||
|
{
|
||||||
|
unsigned char *key;
|
||||||
|
size_t keylen;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
key = read_key (fname);
|
||||||
|
if (!key)
|
||||||
|
return;
|
||||||
|
keylen = gcry_sexp_canon_len (key, 0, NULL,NULL);
|
||||||
|
assert (keylen);
|
||||||
|
|
||||||
|
p = make_advanced (key, keylen);
|
||||||
|
xfree (key);
|
||||||
|
if (p)
|
||||||
|
{
|
||||||
|
fwrite (p, strlen (p), 1, stdout);
|
||||||
|
xfree (p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -424,7 +447,7 @@ main (int argc, char **argv )
|
|||||||
else if (cmd == oShowShadowInfo)
|
else if (cmd == oShowShadowInfo)
|
||||||
show_shadow_info (*argv);
|
show_shadow_info (*argv);
|
||||||
else
|
else
|
||||||
log_info ("no action requested\n");
|
show_file (*argv);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user