107 |
static const char * |
static const char * |
108 |
cmd_keyserv_handler (gpgme_editkey_t ctx, gpg_status_code_t code, const char * key) |
cmd_keyserv_handler (gpgme_editkey_t ctx, gpg_status_code_t code, const char * key) |
109 |
{ |
{ |
|
if( do_check( code, GET_LINE, key, "keyedit.prompt" ) ) |
|
|
|
|
110 |
if (do_check (code, GET_LINE, key, "keyedit.add_keyserver")) |
if (do_check (code, GET_LINE, key, "keyedit.add_keyserver")) |
111 |
return ctx->u.keyserv.url; |
return ctx->u.keyserv.url; |
112 |
if (do_check (code, GET_BOOL, key, "keyedit.confirm_keyserver")) |
if (do_check (code, GET_BOOL, key, "keyedit.confirm_keyserver")) |
122 |
static const char* |
static const char* |
123 |
cmd_sign_handler( gpgme_editkey_t ctx, gpg_status_code_t code, const char *key ) |
cmd_sign_handler( gpgme_editkey_t ctx, gpg_status_code_t code, const char *key ) |
124 |
{ |
{ |
125 |
DEBUG2 ("cmd_sign: code=%d args=`%s'\n", code, key); |
/*DEBUG2 ("cmd_sign: code=%d args=`%s'\n", code, key);*/ |
126 |
|
|
127 |
if( !strcmp( key, "sign_uid.class" ) ) { |
if( !strcmp( key, "sign_uid.class" ) ) { |
128 |
static char id[32]; |
static char id[32]; |
586 |
if (!code) |
if (!code) |
587 |
return NULL; |
return NULL; |
588 |
|
|
589 |
if (!ctx || ctx->type != c->edit_cmd) |
if (!ctx || ctx->type != c->edit_cmd) { |
|
{ |
|
590 |
DEBUG2 ("editkey cmd handler has a wrong type (%d != %d)", ctx->type, c->edit_cmd); |
DEBUG2 ("editkey cmd handler has a wrong type (%d != %d)", ctx->type, c->edit_cmd); |
591 |
return NULL; |
return NULL; |
592 |
} |
} |
646 |
|
|
647 |
case GPGME_EDITKEY_SETPREF: |
case GPGME_EDITKEY_SETPREF: |
648 |
return cmd_setpref_handler (ctx, code, key); |
return cmd_setpref_handler (ctx, code, key); |
649 |
|
|
650 |
|
case GPGME_EDITKEY_KEYSERV: |
651 |
|
return cmd_keyserv_handler (ctx, code, key); |
652 |
} |
} |
653 |
|
|
654 |
return NULL; |
return NULL; |
701 |
break; |
break; |
702 |
|
|
703 |
case GPGME_EDITKEY_LSIGN: |
case GPGME_EDITKEY_LSIGN: |
704 |
_gpgme_gpg_add_arg( ctx->gpg, "lsign" ); |
_gpgme_gpg_add_arg (ctx->gpg, "lsign"); |
705 |
break; |
break; |
706 |
|
|
707 |
case GPGME_EDITKEY_NRSIGN: |
case GPGME_EDITKEY_NRSIGN: |
717 |
break; |
break; |
718 |
|
|
719 |
case GPGME_EDITKEY_ADDKEY: |
case GPGME_EDITKEY_ADDKEY: |
720 |
_gpgme_gpg_add_arg( ctx->gpg, "addkey" ); |
_gpgme_gpg_add_arg (ctx->gpg, "addkey"); |
721 |
break; |
break; |
722 |
|
|
723 |
case GPGME_EDITKEY_DELUID: |
case GPGME_EDITKEY_DELUID: |
929 |
i->flags.no_ks_modify = 1; |
i->flags.no_ks_modify = 1; |
930 |
len -= 13; /* ,no-ks-modify */ |
len -= 13; /* ,no-ks-modify */ |
931 |
} |
} |
932 |
i->prefs = calloc (1, len); |
i->prefs = calloc (1, len+1); |
933 |
if (!i->prefs) |
if (!i->prefs) |
934 |
return; |
return; |
935 |
memcpy (i->prefs, pend, len); |
memcpy (i->prefs, pend, len); |