aboutsummaryrefslogtreecommitdiffstats
path: root/g10/call-agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r--g10/call-agent.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index 545b2448a..f29e1b131 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -381,10 +381,11 @@ unhexify_fpr (const char *hexstr, unsigned char *fpr)
for (s=hexstr, n=0; hexdigitp (s); s++, n++)
;
- if (*s || (n != 40))
+ if ((*s && *s != ' ') || (n != 40))
return 0; /* no fingerprint (invalid or wrong length). */
for (s=hexstr, n=0; *s; s += 2, n++)
fpr[n] = xtoi_2 (s);
+
return 1; /* okay */
}
@@ -625,6 +626,24 @@ learn_status_cb (void *opaque, const char *line)
else if (no == 3)
parm->fpr3time = strtoul (line, NULL, 10);
}
+ else if (keywordlen == 11 && !memcmp (keyword, "KEYPAIRINFO", keywordlen))
+ {
+ const char *hexgrp = line;
+ int no;
+
+ while (*line && !spacep (line))
+ line++;
+ while (spacep (line))
+ line++;
+ if (strncmp (line, "OPENPGP.", 8))
+ ;
+ else if ((no = atoi (line+8)) == 1)
+ unhexify_fpr (hexgrp, parm->grp1);
+ else if (no == 2)
+ unhexify_fpr (hexgrp, parm->grp2);
+ else if (no == 3)
+ unhexify_fpr (hexgrp, parm->grp3);
+ }
else if (keywordlen == 6 && !memcmp (keyword, "CA-FPR", keywordlen))
{
int no = atoi (line);