/[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 6 by twoaday, Mon Jan 31 11:02:21 2005 UTC revision 7 by twoaday, Mon Apr 4 07:01:43 2005 UTC
# Line 1  Line 1 
1  /* editkey.c - GPG edit key interface  /* editkey.c - GPG edit key interface
2   *      Copyright (C) 2001-2004 Timo Schulz   *      Copyright (C) 2001-2005 Timo Schulz
3   *   *
4   * This file is part of MyGPGME.   * This file is part of MyGPGME.
5   *   *
# Line 63  editkey_status_handler( gpgme_ctx_t ctx, Line 63  editkey_status_handler( gpgme_ctx_t ctx,
63      if (ctx->out_of_core)      if (ctx->out_of_core)
64          return;          return;
65    
66      if (ctx->result_type == RESULT_TYPE_NONE)      if (ctx->result_type == RESULT_TYPE_NONE) {
     {  
67          ctx->result.editk = calloc (1, sizeof * ctx->result.editk);          ctx->result.editk = calloc (1, sizeof * ctx->result.editk);
68          if (!ctx->result.editk)          if (!ctx->result.editk) {
         {  
69              ctx->out_of_core = 1;              ctx->out_of_core = 1;
70              return;              return;
71          }          }
# Line 290  cmd_delkey_handler( gpgme_editkey_t ctx, Line 288  cmd_delkey_handler( gpgme_editkey_t ctx,
288    
289    
290  static const char*  static const char*
291  cmd_addkey_handler( gpgme_editkey_t ctx, gpg_status_code_t code, const char *key )  cmd_addkey_handler (gpgme_editkey_t ctx, gpg_status_code_t code, const char *key)
292  {  {
293      static char buf[64];      static char buf[64];
294    
# Line 524  cmd_addrev_handler (gpgme_editkey_t ctx, Line 522  cmd_addrev_handler (gpgme_editkey_t ctx,
522  {  {
523      int step = *r_step;      int step = *r_step;
524    
525    
526      /*DEBUG3("code=%d key=%s step=%d\n", code, key, step);*/      /*DEBUG3("code=%d key=%s step=%d\n", code, key, step);*/
527      if ((step == 0 || c->result.editk->already_signed)      if ((step == 0 /*|| c->result.editk->already_signed*/)
528          && do_check (code, GET_LINE, key, "keyedit.add_revoker")) {          && do_check (code, GET_LINE, key, "keyedit.add_revoker")) {
529          *r_step = step = 1;          *r_step = step = 1;
530          if (c->result.editk->already_signed) {          if (c->result.editk && c->result.editk->already_signed) {
531              *r_step = step = 3;              *r_step = step = 3;
532              return "";              return "";
533          }          }
# Line 828  gpgme_op_editkey( gpgme_ctx_t ctx, const Line 827  gpgme_op_editkey( gpgme_ctx_t ctx, const
827          else if (use_key_check && ctx->result.editk->key_expired)          else if (use_key_check && ctx->result.editk->key_expired)
828              rc = mk_error (Invalid_Mode);              rc = mk_error (Invalid_Mode);
829          else if( gpgme_get_process_rc( ctx ) )          else if( gpgme_get_process_rc( ctx ) )
830              rc = mk_error( Interal_GPG_Problem );              rc = mk_error( Internal_GPG_Problem );
831      }      }
832      return rc;      return rc;
833  } /* gpgme_op_editkey */  } /* gpgme_op_editkey */

Legend:
Removed from v.6  
changed lines
  Added in v.7

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26