341 |
} |
} |
342 |
if (ctx->cnt == 0 && !strcmp (key, "passphrase.enter")) { |
if (ctx->cnt == 0 && !strcmp (key, "passphrase.enter")) { |
343 |
ctx->cnt = 1; |
ctx->cnt = 1; |
344 |
|
/* it is possible that there is no old passphrase. */ |
345 |
|
if (!ctx->pass && ctx->flags) |
346 |
|
return ""; |
347 |
return ctx->pass; |
return ctx->pass; |
348 |
} |
} |
349 |
if (!strcmp (key, "passphrase.enter" )) |
if (!strcmp (key, "passphrase.enter" )) |
362 |
static const char* |
static const char* |
363 |
cmd_setpref_handler (GpgKeyEdit *ctx, gpgme_status_code_t code, const char * key) |
cmd_setpref_handler (GpgKeyEdit *ctx, gpgme_status_code_t code, const char * key) |
364 |
{ |
{ |
365 |
static char buf[128]; |
static char buf[128] = {0}; |
366 |
|
|
367 |
/* XXX: check the code. */ |
/* XXX: check the code. */ |
368 |
#if 0 |
#if 0 |
389 |
return "save"; |
return "save"; |
390 |
} |
} |
391 |
#endif |
#endif |
392 |
return NULL; |
return buf; |
393 |
} |
} |
394 |
|
|
395 |
|
|
724 |
break; |
break; |
725 |
|
|
726 |
case GPGME_STATUS_BAD_PASSPHRASE: |
case GPGME_STATUS_BAD_PASSPHRASE: |
727 |
|
log_debug ("editkey_command_handler: bad passphrase\n"); |
728 |
ke->setResult (EDITKEY_ERR_BAD_PASSPHRASE); |
ke->setResult (EDITKEY_ERR_BAD_PASSPHRASE); |
729 |
break; |
break; |
730 |
|
|