49 |
|
|
50 |
if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) { |
if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) { |
51 |
ctx->cmd_sent = 1; |
ctx->cmd_sent = 1; |
52 |
sprintf (buf, "uid %d", ctx->uid_index); |
sprintf (buf, "uid %d", ctx->getUseridIndex ()); |
53 |
return buf; |
return buf; |
54 |
} |
} |
55 |
if (!strcmp (key, "keyedit.prompt") && !ctx->cnt) { |
if (!strcmp (key, "keyedit.prompt") && !ctx->cnt) { |
77 |
{ |
{ |
78 |
static char buf[32]; |
static char buf[32]; |
79 |
|
|
80 |
|
if (ctx->getUseridIndex () != -1 && |
81 |
|
ctx->cnt == 0 && !strcmp (key, "keyedit.prompt")) { |
82 |
|
ctx->cnt++; |
83 |
|
sprintf (buf, "uid %d", ctx->getUseridIndex ()); |
84 |
|
return buf; |
85 |
|
} |
86 |
|
|
87 |
if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) { |
if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) { |
88 |
ctx->cmd_sent = 1; |
ctx->cmd_sent = 1; |
89 |
switch (ctx->getType ()) { |
switch (ctx->getType ()) { |
184 |
int step = *r_step; |
int step = *r_step; |
185 |
|
|
186 |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
187 |
sprintf (buf, "uid %d", ctx->uid_index); |
sprintf (buf, "uid %d", ctx->getUseridIndex ()); |
188 |
*r_step = step = 1; |
*r_step = step = 1; |
189 |
return buf; |
return buf; |
190 |
} |
} |
206 |
} |
} |
207 |
|
|
208 |
|
|
209 |
static const char * |
static const char* |
210 |
cmd_delsig_handler (GpgKeyEdit *ctx, gpgme_status_code_t code, const char * key, |
cmd_delsig_handler (GpgKeyEdit *ctx, gpgme_status_code_t code, const char *key, |
211 |
int * r_step) |
int *r_step) |
212 |
{ |
{ |
213 |
static char buf[64]; |
static char buf[64]; |
214 |
int step = *r_step; |
int step = *r_step; |
215 |
|
|
216 |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
217 |
sprintf (buf, "uid %d", ctx->uid_index); |
sprintf (buf, "uid %d", ctx->getUseridIndex ()); |
218 |
*r_step = step = 1; |
*r_step = step = 1; |
219 |
return buf; |
return buf; |
220 |
} |
} |
224 |
} |
} |
225 |
if (!strcmp (key, "keyedit.delsig.unknown") || |
if (!strcmp (key, "keyedit.delsig.unknown") || |
226 |
!strcmp (key, "keyedit.delsig.valid")) { |
!strcmp (key, "keyedit.delsig.valid")) { |
227 |
if (++ctx->cnt == ctx->sig_index) |
if (++ctx->cnt == ctx->getSigIndex ()) |
228 |
return "Y"; |
return "Y"; |
229 |
else |
else |
230 |
return "N"; |
return "N"; |
249 |
int step = *r_step; |
int step = *r_step; |
250 |
|
|
251 |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
252 |
sprintf (buf, "key %d", ctx->key_index); |
sprintf (buf, "key %d", ctx->getKeyIndex ()); |
253 |
*r_step = step = 1; |
*r_step = step = 1; |
254 |
return buf; |
return buf; |
255 |
} |
} |
371 |
int step = *r_step; |
int step = *r_step; |
372 |
|
|
373 |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
374 |
sprintf (buf, "uid %d", ctx->uid_index); |
sprintf (buf, "uid %d", ctx->getUseridIndex ()); |
375 |
*r_step = step = 1; |
*r_step = step = 1; |
376 |
return buf; |
return buf; |
377 |
} |
} |
400 |
int step = *r_step; |
int step = *r_step; |
401 |
|
|
402 |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
403 |
sprintf (buf, "key %d", ctx->key_index); |
sprintf (buf, "key %d", ctx->getKeyIndex ()); |
404 |
*r_step = step = 1; |
*r_step = step = 1; |
405 |
return buf; |
return buf; |
406 |
} |
} |
437 |
|
|
438 |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
if (step == 0 && !strcmp (key, "keyedit.prompt")) { |
439 |
*r_step = step = 1; |
*r_step = step = 1; |
440 |
sprintf (buf, "uid %d", ctx->uid_index); |
sprintf (buf, "uid %d", ctx->getUseridIndex ()); |
441 |
return buf; |
return buf; |
442 |
} |
} |
443 |
else if (step == 1 && !strcmp (key, "keyedit.prompt")) { |
else if (step == 1 && !strcmp (key, "keyedit.prompt")) { |
481 |
int step = *r_step; |
int step = *r_step; |
482 |
|
|
483 |
if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) { |
if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) { |
484 |
sprintf( buf, "uid %d", ctx->uid_index); |
sprintf( buf, "uid %d", ctx->getUseridIndex ()); |
485 |
*r_step = step = 1; |
*r_step = step = 1; |
486 |
return buf; |
return buf; |
487 |
} |
} |
532 |
static char buf[64]; |
static char buf[64]; |
533 |
|
|
534 |
if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) { |
if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) { |
535 |
sprintf( buf, "key %d", ctx->key_index); |
sprintf( buf, "key %d", ctx->getKeyIndex ()); |
536 |
*r_step = step = 1; |
*r_step = step = 1; |
537 |
return buf; |
return buf; |
538 |
} |
} |