/[winpt]/trunk/MyGPGME/editkey.c
ViewVC logotype

Diff of /trunk/MyGPGME/editkey.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 15 by twoaday, Mon May 9 08:53:51 2005 UTC revision 23 by twoaday, Fri Sep 30 10:10:16 2005 UTC
# Line 107  editkey_status_handler( gpgme_ctx_t ctx, Line 107  editkey_status_handler( gpgme_ctx_t ctx,
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"))
# Line 124  cmd_keyserv_handler (gpgme_editkey_t ctx Line 122  cmd_keyserv_handler (gpgme_editkey_t ctx
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];
# Line 588  editkey_command_handler (void * opaque, Line 586  editkey_command_handler (void * opaque,
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      }      }
# Line 649  editkey_command_handler (void * opaque, Line 646  editkey_command_handler (void * opaque,
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;
# Line 701  editkey_start (gpgme_ctx_t ctx, const ch Line 701  editkey_start (gpgme_ctx_t ctx, const ch
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:
# Line 717  editkey_start (gpgme_ctx_t ctx, const ch Line 717  editkey_start (gpgme_ctx_t ctx, const ch
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:
# Line 929  edit_key_colon_handler (gpgme_uidinfo_t Line 929  edit_key_colon_handler (gpgme_uidinfo_t
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);

Legend:
Removed from v.15  
changed lines
  Added in v.23

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26