/[winpt]/trunk/Src/wptKeyEditCB.cpp
ViewVC logotype

Diff of /trunk/Src/wptKeyEditCB.cpp

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

revision 68 by twoaday, Sat Nov 5 12:00:55 2005 UTC revision 101 by twoaday, Fri Nov 25 10:56:05 2005 UTC
# Line 563  cmd_addrev_handler (GpgKeyEdit *ctx, gpg Line 563  cmd_addrev_handler (GpgKeyEdit *ctx, gpg
563  {  {
564      int step = *r_step;      int step = *r_step;
565    
566        /* If the isuser already signed the key, send an empty
567           string and jump to quit. */
568        if (ctx->getResult () & GPG_EDITRES_ALREADY_SIGNED
569            && *r_step != -1 && *r_step != 4) {
570            *r_step = step = -1;
571            return "";
572        }
573        if (*r_step == -1) {
574            *r_step = step = 4;
575            return ""; /* empty value to abort. */
576        }
577      if (step == 0 && !strcmp (key, "keyedit.prompt")) {      if (step == 0 && !strcmp (key, "keyedit.prompt")) {
578          *r_step = step = 1;          *r_step = step = 1;
579          return "addrevoker";          return "addrevoker";
580      }      }
581      if (step == 1 && !strcmp (key, "keyedit.add_revoker")) {      if (step == 1 && !strcmp (key, "keyedit.add_revoker")) {
582          *r_step = step = 2;          *r_step = step = 2;
         /* XXX: handle already-signed. */  
583          return ctx->name;          return ctx->name;
584      }      }
585      if (step == 2 && !strcmp (key, "keyedit.add_revoker.okay")) {      if (step == 2 && !strcmp (key, "keyedit.add_revoker.okay")) {
# Line 761  editkey_command_handler (void *opaque, g Line 771  editkey_command_handler (void *opaque, g
771  static gpgme_error_t  static gpgme_error_t
772  map_result (GpgKeyEdit *ke)  map_result (GpgKeyEdit *ke)
773  {  {
774        /* XXX Sometimes ALREADY_SIGNED indicates an failure. */
775      if (!ke->getResult ())      if (!ke->getResult ())
776          return gpg_error (GPG_ERR_NO_ERROR);          return gpg_error (GPG_ERR_NO_ERROR);
777      if (ke->getResult () & GPG_EDITRES_BAD_PASSPHRASE)      if (ke->getResult () & GPG_EDITRES_BAD_PASSPHRASE)

Legend:
Removed from v.68  
changed lines
  Added in v.101

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26