summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/call-agent.c24
-rw-r--r--g10/call-agent.h1
2 files changed, 25 insertions, 0 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index 4e3bdf9e4..42e2d3720 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -499,6 +499,11 @@ agent_release_card_info (struct agent_card_info_s *info)
xfree (info->private_do[i]);
info->private_do[i] = NULL;
}
+ for (i=0; i < DIM(info->supported_keyalgo); i++)
+ {
+ free_strlist (info->supported_keyalgo[i]);
+ info->supported_keyalgo[i] = NULL;
+ }
}
@@ -744,6 +749,25 @@ learn_status_cb (void *opaque, const char *line)
parm->uif[no] = (data[0] != 0xff);
xfree (data);
}
+ else if (keywordlen == 13 && !memcmp (keyword, "KEY-ATTR-INFO", 13))
+ {
+ if (!strncmp (line, "OPENPGP.", 8))
+ {
+ int no;
+
+ line += 8;
+ no = atoi (line);
+ if (no >= 1 && no <= 3)
+ {
+ no--;
+ line++;
+ while (spacep (line))
+ line++;
+ append_to_strlist (&parm->supported_keyalgo[no], xstrdup (line));
+ }
+ }
+ /* Skip when it's not "OPENPGP.[123]". */
+ }
return 0;
}
diff --git a/g10/call-agent.h b/g10/call-agent.h
index 8f929be27..4a66af2aa 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -76,6 +76,7 @@ struct agent_card_info_s
unsigned int status_indicator;
int kdf_do_enabled; /* Non-zero if card has a KDF object, 0 if not. */
int uif[3]; /* True if User Interaction Flag is on. */
+ strlist_t supported_keyalgo[3];
};