mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01: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
9c5c7c6f60
commit
c5c21a0646
@ -318,6 +318,11 @@ read_key (const char *fname)
|
||||
buf = read_file (fname, &buflen);
|
||||
if (!buf)
|
||||
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);
|
||||
xfree (buf);
|
||||
return key;
|
||||
|
Loading…
x
Reference in New Issue
Block a user