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

Diff of /trunk/Src/wptKeysignDlg.cpp

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

revision 23 by twoaday, Fri Sep 30 10:10:16 2005 UTC revision 24 by twoaday, Sat Oct 8 10:43:08 2005 UTC
# Line 62  static const char* Line 62  static const char*
62  get_keyinfo (gpgme_key_t key)  get_keyinfo (gpgme_key_t key)
63  {  {
64      static char buf[64+16];      static char buf[64+16];
65          struct winpt_key_s k;
66    
67        memset (&k, 0, sizeof (k));
68        winpt_get_seckey (key->subkeys->keyid, &k);
69      _snprintf (buf, DIM (buf)-1-16, "%d-bit %s key, ID %s",      _snprintf (buf, DIM (buf)-1-16, "%d-bit %s key, ID %s",
70          key->subkeys->length,          key->subkeys->length,
71          key->subkeys->pubkey_algo,          get_key_pubalgo (key->subkeys->pubkey_algo),
72          key->subkeys->keyid+8);          key->subkeys->keyid+8);
73      // XXX      if (k.ext->gloflags.divert_to_card)
74      //if (gpgme_key_get_ulong_attr (key, GPGME_ATTR_DIVERT_CARD, NULL, 0))          strcat (buf, " (Card)");
     //  strcat (buf, " (Card)");  
75      return buf;      return buf;
76  }  }
77    
# Line 225  keysign_dlg_proc (HWND dlg, UINT msg, WP Line 227  keysign_dlg_proc (HWND dlg, UINT msg, WP
227          if (s)          if (s)
228              uid = utf8_to_wincp (s, strlen (s));              uid = utf8_to_wincp (s, strlen (s));
229          _snprintf (keymsg, sizeof keymsg -1,          _snprintf (keymsg, sizeof keymsg -1,
230                     _("pub %d/%s created: %s    expires: %s\n\n"                     _("pub %d/%s  created: %s    expires: %s\n\n"
231                       "Primary key fingerprint: %s\n\n"                       "Primary key fingerprint: %s\n\n"
232                       "\t%s\n\n"                       "\t%s\n\n"
233                       "\nAre you really sure that you want to sign this key with YOUR key?\n"),                       "\nAre you really sure that you want to sign this key with YOUR key?\n"),
# Line 319  keysign_dlg_proc (HWND dlg, UINT msg, WP Line 321  keysign_dlg_proc (HWND dlg, UINT msg, WP
321                  ke->setLocalUser (k);                  ke->setLocalUser (k);
322    
323              err = ke->signKey (type, sig_class_choice, expires? keymsg : NULL);              err = ke->signKey (type, sig_class_choice, expires? keymsg : NULL);
324              memset (&pwd, 0, sizeof pwd);              memset (&pwd, 0, sizeof pwd);          
             delete ke;  
325              if (err) {              if (err) {
326                    delete ke;
327                  msg_box (dlg, gpgme_strerror (err), _("Key Signing"), MB_ERR);                  msg_box (dlg, gpgme_strerror (err), _("Key Signing"), MB_ERR);
328                  return TRUE;                  return TRUE;
329              }              }
330              status_box (dlg, _("Key successfully signed."), PGM_NAME);              if (ke->getResultValue () != 0)
331              key->update = 1;                  msg_box (dlg, _("This key is already signed by your key"), _("Key Signing"), MB_INFO);
332                else {
333                    status_box (dlg, _("Key successfully signed."), PGM_NAME);
334                    key->update = 1;
335                }
336                delete ke;
337              EndDialog (dlg, TRUE);              EndDialog (dlg, TRUE);
338              return TRUE;              return TRUE;
339                            

Legend:
Removed from v.23  
changed lines
  Added in v.24

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26