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 |
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)) |
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; |
378 |
{ |
{ |
379 |
cmd_sent = 0; |
cmd_sent = 0; |
380 |
cnt = 0; |
cnt = 0; |
|
//resval = 0; |
|
381 |
} |
} |
382 |
|
|
383 |
|
|
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 |