39 |
#include "wptKeylist.h" |
#include "wptKeylist.h" |
40 |
#include "wptAgent.h" |
#include "wptAgent.h" |
41 |
#include "wptRegistry.h" |
#include "wptRegistry.h" |
42 |
|
#include "wptUTF8.h" |
43 |
|
|
44 |
const char* get_symkey_algo (int algo); |
const char* get_symkey_algo (int algo); |
45 |
|
|
166 |
free_if_alloc (info); |
free_if_alloc (info); |
167 |
} |
} |
168 |
else |
else |
169 |
SetDlgItemText_utf8 (dlg, IDC_DECRYPT_MSG, c->info); |
SetDlgItemText (dlg, IDC_DECRYPT_MSG, c->info); |
170 |
} |
} |
171 |
else { |
else { |
172 |
SetFocus (GetDlgItem (dlg, IDC_DECRYPT_SIGN_PWD)); |
SetFocus (GetDlgItem (dlg, IDC_DECRYPT_SIGN_PWD)); |
173 |
SetDlgItemText_utf8 (dlg, IDC_DECRYPT_SIGN_MSG, c->info); |
SetDlgItemText (dlg, IDC_DECRYPT_SIGN_MSG, c->info); |
174 |
} |
} |
175 |
center_window (dlg, NULL); |
center_window (dlg, NULL); |
176 |
SetForegroundWindow (dlg); |
SetForegroundWindow (dlg); |
275 |
gpgme_pubkey_algo_t algo; |
gpgme_pubkey_algo_t algo; |
276 |
char usedkey[16+1]; |
char usedkey[16+1]; |
277 |
char mainkey[16+1]; |
char mainkey[16+1]; |
278 |
char *p; |
char *p, *uid; |
279 |
int n=0; |
int n=0; |
280 |
|
|
281 |
algo = (gpgme_pubkey_algo_t)0; |
algo = (gpgme_pubkey_algo_t)0; |
296 |
uid_hint += 16; /* skip keyid */ |
uid_hint += 16; /* skip keyid */ |
297 |
uid_hint += 1; /* space */ |
uid_hint += 1; /* space */ |
298 |
|
|
299 |
|
uid = utf8_to_native (uid_hint); |
300 |
if (strcmp (usedkey, mainkey)) |
if (strcmp (usedkey, mainkey)) |
301 |
_snprintf (desc, size-1, |
_snprintf (desc, size-1, |
302 |
_("You need a passphrase to unlock the secret key for\n" |
_("You need a passphrase to unlock the secret key for\n" |
303 |
"user: \"%s\"\n" |
"user: \"%s\"\n" |
304 |
"%s key, ID %s (main key ID %s)\n"), |
"%s key, ID %s (main key ID %s)\n"), |
305 |
uid_hint, get_key_pubalgo (algo), usedkey+8, mainkey+8); |
uid, get_key_pubalgo (algo), usedkey+8, mainkey+8); |
306 |
else if (!strcmp (usedkey, mainkey)) |
else if (!strcmp (usedkey, mainkey)) |
307 |
_snprintf (desc, size-1, |
_snprintf (desc, size-1, |
308 |
_("You need a passphrase to unlock the secret key for\n" |
_("You need a passphrase to unlock the secret key for\n" |
309 |
"user: \"%s\"\n" |
"user: \"%s\"\n" |
310 |
"%s key, ID %s\n"), |
"%s key, ID %s\n"), |
311 |
uid_hint, get_key_pubalgo (algo), usedkey+8); |
uid, get_key_pubalgo (algo), usedkey+8); |
312 |
|
safe_free (uid); |
313 |
return 0; |
return 0; |
314 |
} |
} |
315 |
|
|