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

Diff of /trunk/Src/wptKeygenDlg.cpp

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

revision 20 by twoaday, Wed Jul 27 11:17:22 2005 UTC revision 22 by twoaday, Wed Aug 10 11:33:35 2005 UTC
# Line 1  Line 1 
1  /* wptKeygenDlg.cpp - Key Generation dialog  /* wptKeygenDlg.cpp - Key Generation dialog
2   *      Copyright (C) 2000-2004 Timo Schulz   *      Copyright (C) 2000-2005 Timo Schulz
3   *   *
4   * This file is part of WinPT.   * This file is part of WinPT.
5   *   *
# Line 126  keygen_check_date( SYSTEMTIME *st ) Line 126  keygen_check_date( SYSTEMTIME *st )
126    
127    
128  BOOL CALLBACK  BOOL CALLBACK
129  keygen_dlg_proc( HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam )  keygen_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
130  {  {
131      static genkey_s *ctx;      static genkey_s *ctx;
132      static int hide = 1;      static int hide = 1;
# Line 244  keygen_dlg_proc( HWND dlg, UINT msg, WPA Line 244  keygen_dlg_proc( HWND dlg, UINT msg, WPA
244                           _("Key Generation"), MB_ERR );                           _("Key Generation"), MB_ERR );
245                  return FALSE;                  return FALSE;
246              }              }
247              else if( strlen( pwd ) < 8 ) {              else if (check_passwd_quality (pwd, 0)) {
248                  int id = msg_box( dlg, _("Your passphrase should be at least 8 characters"                  int id = msg_box( dlg, _("Your passphrase should be at least 8 characters"
249                                           " long\nand should contain non-alphabetic characters."                                           " long\nand should contain non-alphabetic characters."
250                                           "\n\nStill proceed?"),                                           "\n\nStill proceed?"),
# Line 315  keygen_dlg_proc( HWND dlg, UINT msg, WPA Line 315  keygen_dlg_proc( HWND dlg, UINT msg, WPA
315                            
316              keycache_update (0, fpr);              keycache_update (0, fpr);
317              keycache_update (1, fpr);              keycache_update (1, fpr);
318              if (ctx != NULL)              if (ctx->first_start == 0 && ctx != NULL)
319                  get_pubkey (fpr, &ctx->newkey);                  get_pubkey (fpr, &ctx->newkey);
320              safe_free (fpr);              safe_free (fpr);
321    
# Line 398  keygen_wizard_dlg_proc (HWND dlg, UINT m Line 398  keygen_wizard_dlg_proc (HWND dlg, UINT m
398                           _("Key Generation Wizard"), MB_WARN);                           _("Key Generation Wizard"), MB_WARN);
399                  return FALSE;                  return FALSE;
400              }              }
401              pass = request_passphrase2 (_("Key Generation"), &cancel);              pass = request_passphrase2 (_("Key Generation"), PASSDLG_STRICT, &cancel);
402              if (cancel)              if (cancel)
403                  return FALSE;                  return FALSE;
404              utf8_name = wincp_to_utf8 (name, strlen (name));              utf8_name = wincp_to_utf8 (name, strlen (name));
# Line 406  keygen_wizard_dlg_proc (HWND dlg, UINT m Line 406  keygen_wizard_dlg_proc (HWND dlg, UINT m
406                  BUG( NULL );                  BUG( NULL );
407              if (IsDlgButtonChecked (dlg, IDC_KEYWIZARD_USERSA))              if (IsDlgButtonChecked (dlg, IDC_KEYWIZARD_USERSA))
408                  pubkey_algo = GPGME_KEYGEN_DSA_RSA;                  pubkey_algo = GPGME_KEYGEN_DSA_RSA;
409              p = gpgme_genkey_params (pubkey_algo, 2048, utf8_name,              p = gpgme_genkey_params (pubkey_algo, DFAULT_KEYSIZE, utf8_name,
410                                       NULL, email, NULL, pass);                                       NULL, email, NULL, pass);
411              free( utf8_name );              free( utf8_name );
412              keygen_cb_dlg_create();              keygen_cb_dlg_create();
# Line 427  keygen_wizard_dlg_proc (HWND dlg, UINT m Line 427  keygen_wizard_dlg_proc (HWND dlg, UINT m
427                            
428              keycache_update (0, fpr);              keycache_update (0, fpr);
429              keycache_update (1, fpr);              keycache_update (1, fpr);
430              if (ctx != NULL) {              if (ctx->first_start == 0 && ctx != NULL)
431                  get_pubkey (fpr, &ctx->newkey);                  get_pubkey (fpr, &ctx->newkey);
                 log_box ("debug", 0, "%s %p", fpr, ctx->newkey);  
             }  
432              safe_free (fpr);              safe_free (fpr);
433    
434              ask_for_backup (dlg);              ask_for_backup (dlg);

Legend:
Removed from v.20  
changed lines
  Added in v.22

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26