summaryrefslogtreecommitdiffstats
path: root/g10/call-agent.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/call-agent.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index 0450b8165..a98a177ad 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -471,6 +471,8 @@ get_serialno_cb (void *opaque, const char *line)
void
agent_release_card_info (struct agent_card_info_s *info)
{
+ int i;
+
if (!info)
return;
@@ -482,8 +484,14 @@ agent_release_card_info (struct agent_card_info_s *info)
xfree (info->login_data); info->login_data = NULL;
info->cafpr1valid = info->cafpr2valid = info->cafpr3valid = 0;
info->fpr1valid = info->fpr2valid = info->fpr3valid = 0;
+ for (i=0; i < DIM(info->private_do); i++)
+ {
+ xfree (info->private_do[i]);
+ info->private_do[i] = NULL;
+ }
}
+
static gpg_error_t
learn_status_cb (void *opaque, const char *line)
{
@@ -650,6 +658,14 @@ learn_status_cb (void *opaque, const char *line)
parm->key_attr[keyno].nbits = nbits;
}
}
+ else if (keywordlen == 12 && !memcmp (keyword, "PRIVATE-DO-", 11)
+ && strchr("1234", keyword[11]))
+ {
+ int no = keyword[11] - '1';
+ assert (no >= 0 && no <= 3);
+ xfree (parm->private_do[no]);
+ parm->private_do[no] = unescape_status_string (line);
+ }
return 0;
}