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

Diff of /trunk/Src/wptPassphraseCB.cpp

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

revision 204 by twoaday, Wed Apr 26 06:37:23 2006 UTC revision 205 by twoaday, Thu Apr 27 12:46:03 2006 UTC
# Line 39  Line 39 
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    
# Line 165  passphrase_callback_proc (HWND dlg, UINT Line 166  passphrase_callback_proc (HWND dlg, UINT
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);
# Line 274  parse_gpg_description (const char *uid_h Line 275  parse_gpg_description (const char *uid_h
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;
# Line 295  parse_gpg_description (const char *uid_h Line 296  parse_gpg_description (const char *uid_h
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    

Legend:
Removed from v.204  
changed lines
  Added in v.205

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26