diff options
author | Werner Koch <[email protected]> | 2009-07-22 17:21:47 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2009-07-22 17:21:47 +0000 |
commit | b37b85e722718c1c9cc7362d34a0a352eb2296b8 (patch) | |
tree | e3c1a69c20d4c3ffe9a6dc79ba2a7d41a6e11aae /g10/call-agent.c | |
parent | Emit CARDCTRL status lines. (diff) | |
download | gnupg-b37b85e722718c1c9cc7362d34a0a352eb2296b8.tar.gz gnupg-b37b85e722718c1c9cc7362d34a0a352eb2296b8.zip |
Make use of the card's extended capabilities.
Diffstat (limited to '')
-rw-r--r-- | g10/call-agent.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c index 3ee025f96..1b7578175 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -366,6 +366,30 @@ learn_status_cb (void *opaque, const char *line) xfree (buf); } } + else if (keywordlen == 6 && !memcmp (keyword, "EXTCAP", keywordlen)) + { + char *p, *p2, *buf; + int abool; + + buf = p = unescape_status_string (line); + if (buf) + { + for (p = strtok (buf, " "); p; p = strtok (NULL, " ")) + { + p2 = strchr (p, '='); + if (p2) + { + *p2++ = 0; + abool = (*p2 == '1'); + if (!strcmp (p, "ki")) + parm->extcap.ki = abool; + else if (!strcmp (p, "aac")) + parm->extcap.aac = abool; + } + } + xfree (buf); + } + } else if (keywordlen == 7 && !memcmp (keyword, "KEY-FPR", keywordlen)) { int no = atoi (line); @@ -380,6 +404,20 @@ learn_status_cb (void *opaque, const char *line) else if (no == 3) parm->fpr3valid = unhexify_fpr (line, parm->fpr3); } + else if (keywordlen == 8 && !memcmp (keyword, "KEY-TIME", keywordlen)) + { + int no = atoi (line); + while (* line && !spacep (line)) + line++; + while (spacep (line)) + line++; + if (no == 1) + parm->fpr1time = strtoul (line, NULL, 10); + else if (no == 2) + parm->fpr2time = strtoul (line, NULL, 10); + else if (no == 3) + parm->fpr3time = strtoul (line, NULL, 10); + } else if (keywordlen == 6 && !memcmp (keyword, "CA-FPR", keywordlen)) { int no = atoi (line); |