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

Diff of /trunk/Src/wptKeyEdit.cpp

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

revision 200 by twoaday, Mon Apr 17 09:12:50 2006 UTC revision 225 by twoaday, Tue Jun 6 13:37:59 2006 UTC
# Line 34  Line 34 
34  #include "wptW32API.h"  #include "wptW32API.h"
35  #include "wptGPG.h"  #include "wptGPG.h"
36  #include "wptErrors.h"  #include "wptErrors.h"
37    #include "wptUTF8.h"
38    
39    
40  /* Parse the colon status information of @line and store  /* Parse the colon status information of @line and store
# Line 92  uid_inf_colon_handler (gpg_uid_info_t *i Line 93  uid_inf_colon_handler (gpg_uid_info_t *i
93  {  {
94      gpg_uid_info_t i, t;      gpg_uid_info_t i, t;
95      char *p, *pend;      char *p, *pend;
96        char *name;
97      int field = 0, len = 0;      int field = 0, len = 0;
98    
99      if (!line || strlen (line) < 3 || strncmp (line, "uid", 3))      if (!line || strlen (line) < 3 || strncmp (line, "uid", 3))
# Line 122  uid_inf_colon_handler (gpg_uid_info_t *i Line 124  uid_inf_colon_handler (gpg_uid_info_t *i
124              break;              break;
125    
126          case 10: /* user ID */          case 10: /* user ID */
127              i->name = (char *)calloc (1, strlen (pend)+1);              name = (char *)calloc (1, strlen (pend)+1);
128              if (!i->name)              if (!name)
129                  return gpg_error (GPG_ERR_ENOMEM);;                  return gpg_error (GPG_ERR_ENOMEM);;
130              gpg_decode_c_string (pend, &i->name, strlen (pend)+ 1);              gpg_decode_c_string (pend, &name, strlen (pend)+ 1);
131                i->name = utf8_to_native (name);
132                safe_free (name);
133              if (strchr (pend, '<') != NULL && strchr (pend, '>') != NULL) {              if (strchr (pend, '<') != NULL && strchr (pend, '>') != NULL) {
134                  int pos = strchr (i->name, '<')- i->name + 1;                  int pos = strchr (i->name, '<')- i->name + 1;
135                  int end = strchr (i->name, '>') - i->name;                  int end = strchr (i->name, '>') - i->name;
# Line 374  GpgKeyEdit::reset (void) Line 378  GpgKeyEdit::reset (void)
378  {  {
379      cmd_sent = 0;      cmd_sent = 0;
380      cnt = 0;      cnt = 0;
     //resval = 0;  
381  }  }
382    
383    
# Line 794  GpgKeyEdit::disable (void) Line 797  GpgKeyEdit::disable (void)
797      return gpg_editkey (this->ctx, this->key, this);      return gpg_editkey (this->ctx, this->key, this);
798  }  }
799    
800    
801    /* Remove unusable parts and all signatures from a key. */
802    gpgme_error_t
803    GpgKeyEdit::minimizeKey (void)
804    {
805        if (!this->key)
806            return gpg_error (GPG_ERR_INV_OBJ);
807        type = GPG_EDITKEY_MINIMIZE;
808        return gpg_editkey (this->ctx, this->key, this);
809    }
810    
811    
812  /* Remove unusable parts from a key. */  /* Remove unusable parts from a key. */
813  gpgme_error_t  gpgme_error_t

Legend:
Removed from v.200  
changed lines
  Added in v.225

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26