119 |
if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) { |
if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) { |
120 |
ctx->cmd_sent = 1; |
ctx->cmd_sent = 1; |
121 |
switch (ctx->getType ()) { |
switch (ctx->getType ()) { |
122 |
case GPG_EDITKEY_SIGN: return "sign"; |
case GPG_EDITKEY_SIGN: return "sign"; |
123 |
case GPG_EDITKEY_TSIGN: return "tsign"; |
case GPG_EDITKEY_TSIGN: return "tsign"; |
124 |
case GPG_EDITKEY_LSIGN: return "lsign"; |
case GPG_EDITKEY_LSIGN: return "lsign"; |
125 |
case GPG_EDITKEY_NRSIGN: return"nrsign"; |
case GPG_EDITKEY_NRSIGN: return "nrsign"; |
126 |
case GPG_EDITKEY_NRLSIGN: return "nrlsign"; |
case GPG_EDITKEY_NRLSIGN: return "nrlsign"; |
127 |
} |
} |
128 |
} |
} |
129 |
if (!strcmp (key, "sign_uid.class")) { |
if (!strcmp (key, "sign_uid.class")) { |
133 |
if (!strcmp (key, "sign_uid.expire")) |
if (!strcmp (key, "sign_uid.expire")) |
134 |
return "Y"; /* the sig expires when the key expires */ |
return "Y"; /* the sig expires when the key expires */ |
135 |
if (!strcmp (key, "siggen.valid")) |
if (!strcmp (key, "siggen.valid")) |
136 |
return ctx->exp_date; |
return ctx->exp_date? ctx->exp_date : "0"; |
137 |
if (!strcmp (key, "trustsig_prompt.trust_value")) { |
if (!strcmp (key, "trustsig_prompt.trust_value")) { |
138 |
sprintf (buf, "%d", ctx->trust_id); |
sprintf (buf, "%d", ctx->trust_id); |
139 |
return buf; |
return buf; |