116 |
BOOL CALLBACK |
BOOL CALLBACK |
117 |
sigprops_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
sigprops_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
118 |
{ |
{ |
119 |
static gpgme_key_sig_t ks; |
gpgme_key_sig_t ks; |
120 |
gpgme_key_t issuer; |
gpgme_key_t issuer; |
121 |
char tmpbuf[256]; |
char tmpbuf[256]; |
122 |
struct { |
struct { |
128 |
int _class; |
int _class; |
129 |
} ctx; |
} ctx; |
130 |
const char *fmt_templ = _("%s %s signature"); |
const char *fmt_templ = _("%s %s signature"); |
131 |
|
char *s; |
132 |
|
|
133 |
switch (msg) { |
switch (msg) { |
134 |
case WM_SYSCOMMAND: |
case WM_SYSCOMMAND: |
146 |
SetDlgItemText (dlg, IDC_SIGPROPS_EXPSTR, _("Expire date")); |
SetDlgItemText (dlg, IDC_SIGPROPS_EXPSTR, _("Expire date")); |
147 |
SetDlgItemText (dlg, IDC_SIGPROPS_KEYINF, _("Issuer key")); |
SetDlgItemText (dlg, IDC_SIGPROPS_KEYINF, _("Issuer key")); |
148 |
SetDlgItemText (dlg, IDC_SIGPROPS_KEYIDINF, _("Issuer key ID")); |
SetDlgItemText (dlg, IDC_SIGPROPS_KEYIDINF, _("Issuer key ID")); |
149 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_POLICINF, _("Policy URL")); |
150 |
ks = (gpgme_key_sig_t)lparam; |
ks = (gpgme_key_sig_t)lparam; |
151 |
if (!ks) |
if (!ks) |
152 |
BUG (0); |
BUG (0); |
170 |
SetDlgItemInt (dlg, IDC_SIGPROPS_CLASS, ctx._class, FALSE); |
SetDlgItemInt (dlg, IDC_SIGPROPS_CLASS, ctx._class, FALSE); |
171 |
if (ctx.exportable) |
if (ctx.exportable) |
172 |
CheckDlgButton (dlg, IDC_SIGPROPS_EXP, BST_CHECKED); |
CheckDlgButton (dlg, IDC_SIGPROPS_EXP, BST_CHECKED); |
173 |
if (!get_pubkey (ks->keyid+8, &issuer)) { |
if (!get_pubkey (ks->keyid+8, &issuer)) |
174 |
char *uid = utf8_to_native (issuer->uids->uid); |
s = utf8_to_native (issuer->uids->uid); |
|
SetDlgItemText (dlg, IDC_SIGPROPS_ISSUER, uid); |
|
|
safe_free (uid); |
|
|
} |
|
175 |
else |
else |
176 |
SetDlgItemText (dlg, IDC_SIGPROPS_ISSUER, _(" user ID not found")); |
s = strdup (_(" user ID not found")); |
177 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_ISSUER, s); |
178 |
|
safe_free (s); |
179 |
if (ks->expires == 0) { |
if (ks->expires == 0) { |
180 |
ShowWindow (GetDlgItem (dlg, IDC_SIGPROPS_EXPSTR), SW_HIDE); |
ShowWindow (GetDlgItem (dlg, IDC_SIGPROPS_EXPSTR), SW_HIDE); |
181 |
ShowWindow (GetDlgItem (dlg, IDC_SIGPROPS_EXPDATE), SW_HIDE); |
ShowWindow (GetDlgItem (dlg, IDC_SIGPROPS_EXPDATE), SW_HIDE); |
204 |
if (ctx.expired) |
if (ctx.expired) |
205 |
CheckDlgButton (dlg, IDC_SIGPROPS_EXPIRED, BST_CHECKED); |
CheckDlgButton (dlg, IDC_SIGPROPS_EXPIRED, BST_CHECKED); |
206 |
} |
} |
207 |
|
/* XXX: gpgme does not support cert policy URLs yet. */ |
208 |
|
if (ks->notations && !ks->notations->name && ks->notations->value) |
209 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_POLIC, ks->notations->value); |
210 |
|
|
211 |
SetDlgItemText (dlg, IDC_SIGPROPS_EXP, _("Exportable")); |
SetDlgItemText (dlg, IDC_SIGPROPS_EXP, _("Exportable")); |
212 |
SetDlgItemText (dlg, IDC_SIGPROPS_NREV, _("Non-revocably")); |
SetDlgItemText (dlg, IDC_SIGPROPS_NREV, _("Non-revocably")); |
213 |
SetDlgItemText (dlg, IDC_SIGPROPS_REV, _("Revoked")); |
SetDlgItemText (dlg, IDC_SIGPROPS_REV, _("Revoked")); |
387 |
static struct winpt_key_s *k; |
static struct winpt_key_s *k; |
388 |
gpgme_key_sig_t ks; |
gpgme_key_sig_t ks; |
389 |
HWND sl; |
HWND sl; |
390 |
char inf[384], *utf8_uid; |
char inf[384]; |
391 |
int idx = 0; |
int idx = 0; |
392 |
|
|
393 |
switch (msg) { |
switch (msg) { |
396 |
if (!k) |
if (!k) |
397 |
BUG (0); |
BUG (0); |
398 |
if (k->uid) { |
if (k->uid) { |
399 |
utf8_uid = utf8_to_native (k->uid); |
char *p = utf8_to_native (k->uid); |
400 |
_snprintf (inf, DIM (inf)-1, _("Signature List for \"%s\""), utf8_uid); |
_snprintf (inf, DIM (inf)-1, _("Signature List for \"%s\""), p); |
401 |
safe_free (utf8_uid); |
safe_free (p); |
402 |
} |
} |
403 |
SetWindowText (dlg, inf); |
SetWindowText (dlg, inf); |
404 |
SetDlgItemText (dlg, IDC_KEYSIG_RECVKEY, _("&Receive Key")); |
SetDlgItemText (dlg, IDC_KEYSIG_RECVKEY, _("&Receive Key")); |