mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
agent: Print an error if gpg-protect reads the extended key format.
* agent/protect-tool.c (read_key): Detect simple extended key format. -- This is a quick hack to get a useful error messages. The real fix is to replace the protect tool by a more useful new tool. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2b4b0b1223
commit
011a2f5fb7
1 changed files with 5 additions and 0 deletions
|
@ -316,6 +316,11 @@ read_key (const char *fname)
|
||||||
buf = read_file (fname, &buflen);
|
buf = read_file (fname, &buflen);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
if (buflen >= 4 && !memcmp (buf, "Key:", 4))
|
||||||
|
{
|
||||||
|
log_error ("Extended key format is not supported by this tool\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
key = make_canonical (fname, buf, buflen);
|
key = make_canonical (fname, buf, buflen);
|
||||||
xfree (buf);
|
xfree (buf);
|
||||||
return key;
|
return key;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue