/[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 220 by twoaday, Tue May 30 15:31:49 2006 UTC
# Line 22  Line 22 
22  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
23  #include <config.h>  #include <config.h>
24  #endif  #endif
   
 #include <windows.h>  
25  #include <time.h>  #include <time.h>
26    #include <windows.h>
27    
28  #include "gpgme.h"  #include "gpgme.h"
29  #include "wptCommonCtl.h"  #include "wptCommonCtl.h"
# Line 34  Line 33 
33  #include "wptW32API.h"  #include "wptW32API.h"
34  #include "wptGPG.h"  #include "wptGPG.h"
35  #include "wptErrors.h"  #include "wptErrors.h"
36    #include "wptUTF8.h"
37    
38    
39  /* 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 92  uid_inf_colon_handler (gpg_uid_info_t *i
92  {  {
93      gpg_uid_info_t i, t;      gpg_uid_info_t i, t;
94      char *p, *pend;      char *p, *pend;
95        char *name;
96      int field = 0, len = 0;      int field = 0, len = 0;
97    
98      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 123  uid_inf_colon_handler (gpg_uid_info_t *i
123              break;              break;
124    
125          case 10: /* user ID */          case 10: /* user ID */
126              i->name = (char *)calloc (1, strlen (pend)+1);              name = (char *)calloc (1, strlen (pend)+1);
127              if (!i->name)              if (!name)
128                  return gpg_error (GPG_ERR_ENOMEM);;                  return gpg_error (GPG_ERR_ENOMEM);;
129              gpg_decode_c_string (pend, &i->name, strlen (pend)+ 1);              gpg_decode_c_string (pend, &name, strlen (pend)+ 1);
130                i->name = utf8_to_native (name);
131                safe_free (name);
132              if (strchr (pend, '<') != NULL && strchr (pend, '>') != NULL) {              if (strchr (pend, '<') != NULL && strchr (pend, '>') != NULL) {
133                  int pos = strchr (i->name, '<')- i->name + 1;                  int pos = strchr (i->name, '<')- i->name + 1;
134                  int end = strchr (i->name, '>') - i->name;                  int end = strchr (i->name, '>') - i->name;
# Line 374  GpgKeyEdit::reset (void) Line 377  GpgKeyEdit::reset (void)
377  {  {
378      cmd_sent = 0;      cmd_sent = 0;
379      cnt = 0;      cnt = 0;
     //resval = 0;  
380  }  }
381    
382    
# Line 794  GpgKeyEdit::disable (void) Line 796  GpgKeyEdit::disable (void)
796      return gpg_editkey (this->ctx, this->key, this);      return gpg_editkey (this->ctx, this->key, this);
797  }  }
798    
799    
800    /* Remove unusable parts and all signatures from a key. */
801    gpgme_error_t
802    GpgKeyEdit::minimizeKey (void)
803    {
804        if (!this->key)
805            return gpg_error (GPG_ERR_INV_OBJ);
806        type = GPG_EDITKEY_MINIMIZE;
807        return gpg_editkey (this->ctx, this->key, this);
808    }
809    
810    
811  /* Remove unusable parts from a key. */  /* Remove unusable parts from a key. */
812  gpgme_error_t  gpgme_error_t

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26