Prevent empty credentials

Always require identity (username).

Zero passwords are no security. Prevent zero passwords too.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2020-04-17 14:22:25 +02:00
parent 63db62453a
commit d945ccac73
7 changed files with 539 additions and 661 deletions

View File

@ -2,14 +2,14 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: EAPMethods\n" "Project-Id-Version: EAPMethods\n"
"POT-Creation-Date: 2020-04-17 06:54+0200\n" "POT-Creation-Date: 2020-04-17 14:55+0200\n"
"PO-Revision-Date: 2016-06-02 12:27+0200\n" "PO-Revision-Date: 2016-06-02 12:27+0200\n"
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n" "Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.4\n" "X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ../..\n" "X-Poedit-Basepath: ../..\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: _\n" "X-Poedit-KeywordsList: _\n"
@ -22,71 +22,71 @@ msgstr ""
"X-Poedit-SearchPath-6: lib/TTLS_UI\n" "X-Poedit-SearchPath-6: lib/TTLS_UI\n"
"X-Poedit-SearchPath-7: EAPMethods\n" "X-Poedit-SearchPath-7: EAPMethods\n"
#: lib/EAPBase_UI/include/EAP_UI.h:294 #: lib/EAPBase_UI/include/EAP_UI.h:295
#, c-format #, c-format
msgid "Are you sure you want to permanently remove %s provider from configuration?" msgid "Are you sure you want to permanently remove %s provider from configuration?"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:294 #: lib/EAPBase_UI/include/EAP_UI.h:295
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:380 lib/EAPBase_UI/res/wxEAP_UI.h:117 #: lib/EAPBase_UI/include/EAP_UI.h:381 lib/EAPBase_UI/res/wxEAP_UI.h:116
msgid "EAP Credentials" msgid "EAP Credentials"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:724 #: lib/EAPBase_UI/include/EAP_UI.h:725
msgid "Provider Settings" msgid "Provider Settings"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:757 lib/EAPBase_UI/res/wxEAP_UI.cpp:229 #: lib/EAPBase_UI/include/EAP_UI.h:758 lib/EAPBase_UI/res/wxEAP_UI.cpp:229
#, c-format #, c-format
msgid "%s User Credentials" msgid "%s User Credentials"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:876 lib/TTLS_UI/src/Module.cpp:196 #: lib/EAPBase_UI/include/EAP_UI.h:866 lib/TTLS_UI/src/Module.cpp:196
#: lib/TTLS_UI/src/Module.cpp:305 #: lib/TTLS_UI/src/Module.cpp:305
#, c-format #, c-format
msgid "Error writing credentials to Credential Manager: %hs (error %u)" msgid "Error writing credentials to Credential Manager: %hs (error %u)"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:879 lib/TTLS_UI/src/Module.cpp:198 #: lib/EAPBase_UI/include/EAP_UI.h:869 lib/TTLS_UI/src/Module.cpp:198
#: lib/TTLS_UI/src/Module.cpp:307 #: lib/TTLS_UI/src/Module.cpp:307
msgid "Writing credentials failed." msgid "Writing credentials failed."
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:899 #: lib/EAPBase_UI/include/EAP_UI.h:897
#, c-format #, c-format
msgid "Deleting credentials failed (error %u)." msgid "Deleting credentials failed (error %u)."
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:938 #: lib/EAPBase_UI/include/EAP_UI.h:924 lib/EAPBase_UI/include/EAP_UI.h:943
#: lib/EAPBase_UI/include/EAP_UI.h:952
msgid "(none)"
msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:928
#, c-format #, c-format
msgid "(error %u)" msgid "(error %u)"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:942 #: lib/EAPBase_UI/include/EAP_UI.h:932
msgid "(error)" msgid "(error)"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:953 lib/EAPBase_UI/include/EAP_UI.h:962 #: lib/EAPBase_UI/include/EAP_UI.h:943 lib/EAPBase_UI/include/EAP_UI.h:952
#: lib/TLS_UI/src/TLS_UI.cpp:61
msgid "(none)"
msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:953 lib/EAPBase_UI/include/EAP_UI.h:962
msgid "(blank ID)" msgid "(blank ID)"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:1002 #: lib/EAPBase_UI/include/EAP_UI.h:992
msgid "&Remember" msgid "&Remember"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:1003 #: lib/EAPBase_UI/include/EAP_UI.h:993
msgid "Check if you would like to save credentials" msgid "Check if you would like to save credentials"
msgstr "" msgstr ""
#: lib/EAPBase_UI/include/EAP_UI.h:1212 #: lib/EAPBase_UI/include/EAP_UI.h:1214
msgid "(Your Organization)" msgid "(Your Organization)"
msgstr "" msgstr ""
@ -118,205 +118,201 @@ msgstr ""
msgid "Select the source where your credentials used to connect are stored." msgid "Select the source where your credentials used to connect are stored."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:244 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:250
msgid "Use from Credential &Manager" msgid "Use from Credential &Manager:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:245 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:251
msgid "Select this option if you would like to use credentials stored in Windows Credential Manager" msgid "Select this option if you would like to use credentials stored in Windows Credential Manager"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:255 lib/EAPBase_UI/res/wxEAP_UI.cpp:299 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:258
msgid "Identity:"
msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:262
msgid "Your present credentials stored in Windows Credential Manager" msgid "Your present credentials stored in Windows Credential Manager"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:272 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:268
msgid "Use from &profile configuration:"
msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:269
msgid "Select this option if you would like to store credentials as a part of profile configuration"
msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:276
msgid "Profile configuration credentials"
msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:289
msgid "&Clear Credentials" msgid "&Clear Credentials"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:273 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:290
msgid "" msgid ""
"Click to clear your credentials from Credential Manager.\n" "Click to clear your credentials from Credential Manager.\n"
"Note: You will be prompted to enter credentials when connecting." "Note: You will be prompted to enter credentials when connecting."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:277 lib/EAPBase_UI/res/wxEAP_UI.cpp:316 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:294
msgid "&Set Credentials..." msgid "&Set Credentials..."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:278 lib/EAPBase_UI/res/wxEAP_UI.cpp:317 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:295
msgid "Click here to set or modify your credentials" msgid "Click here to set or modify your credentials"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:288 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:332
msgid "Use from &profile configuration"
msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:289
msgid "Select this option if you would like to store credentials as a part of profile configuration"
msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:306
msgid "Profile configuration credentials"
msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:359
msgid "User ID and Password" msgid "User ID and Password"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:369 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:342
msgid "Please provide your user ID and password." msgid "Please provide your user ID and password."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:379 lib/EAPBase_UI/res/wxEAP_UI.cpp:443 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:352 lib/EAPBase_UI/res/wxEAP_UI.cpp:416
msgid "User ID:" msgid "User ID:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:384 lib/EAPBase_UI/res/wxEAP_UI.cpp:448 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:357 lib/EAPBase_UI/res/wxEAP_UI.cpp:421
msgid "Enter your user name here (user@domain.org, DOMAIN\\User, etc.)" msgid "Enter your user name here (user@domain.org, DOMAIN\\User, etc.)"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:388 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:361
msgid "Password:" msgid "Password:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:393 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:366
msgid "Enter your password here" msgid "Enter your password here"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:423 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:396
msgid "User ID" msgid "User ID"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:433 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:406
msgid "Please provide your user ID." msgid "Please provide your user ID."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:473 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:446
msgid "Your Organization" msgid "Your Organization"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:484 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:457
msgid "Describe your organization to customize user prompts. When organization is introduced, end-users find program messages easier to understand and act." msgid "Describe your organization to customize user prompts. When organization is introduced, end-users find program messages easier to understand and act."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:491 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:464
msgid "Your organization &name:" msgid "Your organization &name:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:496 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:469
msgid "Your organization name as it will appear on helpdesk contact notifications" msgid "Your organization name as it will appear on helpdesk contact notifications"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:500 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:473
msgid "(Keep it short, please)" msgid "(Keep it short, please)"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:510 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:483
msgid "Helpdesk contact &information:" msgid "Helpdesk contact &information:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:527 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:500
msgid "Your helpdesk website address" msgid "Your helpdesk website address"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:538 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:511
msgid "Your helpdesk e-mail address" msgid "Your helpdesk e-mail address"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:549 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:522
msgid "Your helpdesk phone number" msgid "Your helpdesk phone number"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:577 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:550
msgid "Provider Unique Identifier" msgid "Provider Unique Identifier"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:588 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:561
msgid "Assign your organization a unique ID to allow sharing the same credential set across different network profiles." msgid "Assign your organization a unique ID to allow sharing the same credential set across different network profiles."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:595 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:568
msgid "&Namespace:" msgid "&Namespace:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:599 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:572
msgid "urn:RFC4282:realm" msgid "urn:RFC4282:realm"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:599 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:572
msgid "urn:uuid" msgid "urn:uuid"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:611 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:584
msgid "Provider unique &identifier:" msgid "Provider unique &identifier:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:616 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:589
msgid "Your organization ID to assign same credentials from other profiles" msgid "Your organization ID to assign same credentials from other profiles"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:641 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:614
msgid "Configuration Lock" msgid "Configuration Lock"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:652 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:625
msgid "Your configuration can be locked to prevent accidental modification by end-users. Users will only be allowed to enter credentials." msgid "Your configuration can be locked to prevent accidental modification by end-users. Users will only be allowed to enter credentials."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:659 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:632
msgid "&Lock this configuration and prevent any further modification via user interface." msgid "&Lock this configuration and prevent any further modification via user interface."
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:662 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:635
msgid "(Warning: Once locked, you can not revert using this dialog!)" msgid "(Warning: Once locked, you can not revert using this dialog!)"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:727 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:700
msgid "Identity" msgid "Identity"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:738 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:711
msgid "Select the user ID supplicant introduces itself as to authenticator:" msgid "Select the user ID supplicant introduces itself as to authenticator:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:745 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:718
msgid "&True identity" msgid "&True identity"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:746 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:719
msgid "Use my true user name" msgid "Use my true user name"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:750 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:723
msgid "Use &empty identity" msgid "Use &empty identity"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:751 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:724
msgid "Omit my user name and use @mydomain.org only" msgid "Omit my user name and use @mydomain.org only"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:758 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:731
msgid "&Custom identity:" msgid "&Custom identity:"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:759 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:732
msgid "Specify custom identity" msgid "Specify custom identity"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.cpp:764 #: lib/EAPBase_UI/res/wxEAP_UI.cpp:737
msgid "Custom identity to use" msgid "Custom identity to use"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.h:67 #: lib/EAPBase_UI/res/wxEAP_UI.h:66
msgid "EAP Connection Configuration" msgid "EAP Connection Configuration"
msgstr "" msgstr ""
#: lib/EAPBase_UI/res/wxEAP_UI.h:334 #: lib/EAPBase_UI/res/wxEAP_UI.h:329
msgid "EAP Identity Provider" msgid "EAP Identity Provider"
msgstr "" msgstr ""
@ -513,7 +509,7 @@ msgstr ""
msgid "(Example: foo.bar.com;server2.bar.com)" msgid "(Example: foo.bar.com;server2.bar.com)"
msgstr "" msgstr ""
#: lib/TLS_UI/res/wxTLS_UI.cpp:118 lib/TLS_UI/src/TLS_UI.cpp:329 #: lib/TLS_UI/res/wxTLS_UI.cpp:118 lib/TLS_UI/src/TLS_UI.cpp:400
msgid "User Certificate" msgid "User Certificate"
msgstr "" msgstr ""
@ -533,32 +529,40 @@ msgstr ""
msgid "Your identity (username@domain) to override one from certificate; or blank to use one provided in certificate" msgid "Your identity (username@domain) to override one from certificate; or blank to use one provided in certificate"
msgstr "" msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:256 #: lib/TLS_UI/src/TLS_UI.cpp:118
msgid "No certificate selected"
msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:118
msgid "Validation conflict"
msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:327
msgid "Add Certificate" msgid "Add Certificate"
msgstr "" msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:257 #: lib/TLS_UI/src/TLS_UI.cpp:328
msgid "Certificate Files (*.cer;*.crt;*.der;*.p7b;*.pem)" msgid "Certificate Files (*.cer;*.crt;*.der;*.p7b;*.pem)"
msgstr "" msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:258 #: lib/TLS_UI/src/TLS_UI.cpp:329
msgid "X.509 Certificate Files (*.cer;*.crt;*.der;*.pem)" msgid "X.509 Certificate Files (*.cer;*.crt;*.der;*.pem)"
msgstr "" msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:259 #: lib/TLS_UI/src/TLS_UI.cpp:330
msgid "PKCS #7 Certificate Files (*.p7b)" msgid "PKCS #7 Certificate Files (*.p7b)"
msgstr "" msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:260 #: lib/TLS_UI/src/TLS_UI.cpp:331
msgid "All Files (*.*)" msgid "All Files (*.*)"
msgstr "" msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:274 #: lib/TLS_UI/src/TLS_UI.cpp:345
#, c-format #, c-format
msgid "Invalid or unsupported certificate file %s" msgid "Invalid or unsupported certificate file %s"
msgstr "" msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:274 #: lib/TLS_UI/src/TLS_UI.cpp:345
msgid "Error" msgid "Error"
msgstr "" msgstr ""
@ -583,17 +587,17 @@ msgid "Invoking EAP interactive UI failed (error %u)."
msgstr "" msgstr ""
#: lib/TTLS_UI/src/TTLS_UI.cpp:37 #: lib/TTLS_UI/src/TTLS_UI.cpp:37
msgid "Outer Authentication"
msgstr ""
#: lib/TTLS_UI/src/TTLS_UI.cpp:50
msgid "Inner Authentication" msgid "Inner Authentication"
msgstr "" msgstr ""
#: lib/TTLS_UI/src/TTLS_UI.cpp:43 #: lib/TTLS_UI/src/TTLS_UI.cpp:56
msgid "Select inner authentication method from the list" msgid "Select inner authentication method from the list"
msgstr "" msgstr ""
#: lib/TTLS_UI/src/TTLS_UI.cpp:48
msgid "Outer Authentication"
msgstr ""
#: lib/TTLS_UI/src/TTLS_UI.cpp:127 #: lib/TTLS_UI/src/TTLS_UI.cpp:127
msgid "PAP" msgid "PAP"
msgstr "" msgstr ""

View File

@ -126,6 +126,7 @@ inline void wxInitializeConfig();
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/log.h> #include <wx/log.h>
#include <wx/thread.h> #include <wx/thread.h>
#include <wx/valtext.h>
#include <CommCtrl.h> #include <CommCtrl.h>
@ -810,107 +811,96 @@ protected:
{ {
wxEAPCredentialsConfigPanelBase::OnUpdateUI(event); wxEAPCredentialsConfigPanelBase::OnUpdateUI(event);
if (m_cfg.m_allow_save) { bool is_storage = m_storage->GetValue();
if (m_storage->GetValue()) {
m_storage_identity->Enable(true); m_storage_identity->Enable(m_cfg.m_allow_save && is_storage);
m_storage_set ->Enable(true); m_config_identity->Enable(!m_prov.m_read_only && !is_storage);
m_storage_clear ->Enable(m_has_storage);
} else {
m_storage_identity->Enable(false);
m_storage_set ->Enable(false);
m_storage_clear ->Enable(false);
}
} else {
m_storage_identity->Enable(false);
m_storage_set ->Enable(false);
m_storage_clear ->Enable(false);
}
if (m_prov.m_read_only) { if (m_prov.m_read_only) {
// This is provider-locked configuration. Disable controls. // This is provider-locked configuration. Disable controls.
// To avoid run-away selection of radio buttons, disable the selected one last. // To avoid run-away selection of radio buttons, disable the selected one last.
if (m_storage->GetValue()) { if (is_storage) {
m_config ->Enable(false); m_config ->Enable(false);
m_storage->Enable(false); m_storage->Enable(false);
} else { } else {
m_storage->Enable(false); m_storage->Enable(false);
m_config ->Enable(false); m_config ->Enable(false);
} }
m_config_identity->Enable(false);
m_config_set ->Enable(false);
} else { } else {
// This is not a provider-locked configuration. Selectively enable/disable controls. // This is not a provider-locked configuration. Selectively enable/disable controls.
m_storage->Enable(true); m_storage->Enable(true);
m_config->Enable(true); m_config->Enable(true);
if (m_storage->GetValue()) { }
m_config_identity->Enable(false);
m_config_set ->Enable(false); if (is_storage) {
} else { m_set ->Enable(m_cfg.m_allow_save);
m_config_identity->Enable(true); m_clear->Enable(m_cfg.m_allow_save && m_has_storage);
m_config_set ->Enable(true); } else {
} m_set ->Enable(!m_prov.m_read_only);
m_clear->Enable(!m_prov.m_read_only && !m_cred_config.empty());
} }
} }
virtual void OnSetStorage(wxCommandEvent& event) virtual void OnSet(wxCommandEvent& event)
{ {
wxEAPCredentialsConfigPanelBase::OnSetStorage(event); wxEAPCredentialsConfigPanelBase::OnSet(event);
m_timer_storage.Stop(); if (m_storage->GetValue()) {
m_timer_storage.Stop();
// Read credentials from Credential Manager. // Read credentials from Credential Manager.
RetrieveStorageCredentials(); RetrieveStorageCredentials();
// Display credential prompt. // Display credential prompt.
wxEAPCredentialsDialog dlg(m_prov, this); wxEAPCredentialsDialog dlg(m_prov, this);
_wxT *panel = new _wxT(m_prov, m_cfg, m_cred_storage, &dlg, true); _wxT *panel = new _wxT(m_prov, m_cfg, m_cred_storage, &dlg, true);
dlg.AddContent(panel); dlg.AddContent(panel);
if (dlg.ShowModal() == wxID_OK) { if (dlg.ShowModal() == wxID_OK) {
// Write credentials to credential manager. // Write credentials to credential manager.
try { try {
m_cred_storage.store(m_prov.get_id().c_str(), m_cfg.m_level); m_cred_storage.store(m_prov.get_id().c_str(), m_cfg.m_level);
m_has_storage = TRUE; m_has_storage = true;
UpdateStorageIdentity(); UpdateStorageIdentity();
} catch (winstd::win_runtime_error &err) { } catch (winstd::win_runtime_error &err) {
wxLogError(winstd::tstring_printf(_("Error writing credentials to Credential Manager: %hs (error %u)"), err.what(), err.number()).c_str()); wxLogError(winstd::tstring_printf(_("Error writing credentials to Credential Manager: %hs (error %u)"), err.what(), err.number()).c_str());
RetrieveStorageCredentials(); RetrieveStorageCredentials();
} catch (...) { } catch (...) {
wxLogError(_("Writing credentials failed.")); wxLogError(_("Writing credentials failed."));
RetrieveStorageCredentials(); RetrieveStorageCredentials();
}
} }
m_timer_storage.Start(3000);
} else {
wxEAPCredentialsDialog dlg(m_prov, this);
_wxT *panel = new _wxT(m_prov, m_cfg, m_cred_config, &dlg, true);
dlg.AddContent(panel);
if (dlg.ShowModal() == wxID_OK)
UpdateConfigIdentity();
} }
m_timer_storage.Start(3000);
} }
virtual void OnClearStorage(wxCommandEvent& event) virtual void OnClear(wxCommandEvent& event)
{ {
wxEAPCredentialsConfigPanelBase::OnClearStorage(event); wxEAPCredentialsConfigPanelBase::OnClear(event);
m_timer_storage.Stop(); if (m_storage->GetValue()) {
m_timer_storage.Stop();
if (CredDelete(m_cred_storage.target_name(m_prov.get_id().c_str(), m_cfg.m_level).c_str(), CRED_TYPE_GENERIC, 0)) { if (CredDelete(m_cred_storage.target_name(m_prov.get_id().c_str(), m_cfg.m_level).c_str(), CRED_TYPE_GENERIC, 0)) {
m_storage_identity->SetLabel(wxEmptyString); m_storage_identity->SetLabel(wxEmptyString);
m_cred_storage.clear(); m_cred_storage.clear();
m_has_storage = false; m_has_storage = false;
} else } else
wxLogError(_("Deleting credentials failed (error %u)."), GetLastError()); wxLogError(_("Deleting credentials failed (error %u)."), GetLastError());
m_timer_storage.Start(3000); m_timer_storage.Start(3000);
} } else {
m_cred_config.clear();
virtual void OnSetConfig(wxCommandEvent& event)
{
wxEAPCredentialsConfigPanelBase::OnSetConfig(event);
wxEAPCredentialsDialog dlg(m_prov, this);
_wxT *panel = new _wxT(m_prov, m_cfg, m_cred_config, &dlg, true);
dlg.AddContent(panel);
if (dlg.ShowModal() == wxID_OK)
UpdateConfigIdentity(); UpdateConfigIdentity();
}
} }
@ -931,7 +921,7 @@ protected:
UpdateStorageIdentity(); UpdateStorageIdentity();
} catch (winstd::win_runtime_error &err) { } catch (winstd::win_runtime_error &err) {
if (err.number() == ERROR_NOT_FOUND) { if (err.number() == ERROR_NOT_FOUND) {
m_storage_identity->SetLabel(wxEmptyString); m_storage_identity->SetLabel(_("(none)"));
m_cred_storage.clear(); m_cred_storage.clear();
m_has_storage = false; m_has_storage = false;
} else { } else {
@ -1074,6 +1064,8 @@ public:
if (layout) if (layout)
this->Layout(); this->Layout();
m_identity->SetValidator(wxTextValidator(wxFILTER_EMPTY));
} }
protected: protected:
@ -1088,6 +1080,10 @@ protected:
// Credential prompt mode & Using configured credentials // Credential prompt mode & Using configured credentials
m_identity_label->Enable(false); m_identity_label->Enable(false);
m_identity ->Enable(false); m_identity ->Enable(false);
} else {
// Configuration mode or using stored credentials. Enable controls.
m_identity_label->Enable(true);
m_identity ->Enable(true);
} }
return wxEAPCredentialsPanel<_Tcred, _Tbase>::TransferDataToWindow(); return wxEAPCredentialsPanel<_Tcred, _Tbase>::TransferDataToWindow();
@ -1136,6 +1132,8 @@ public:
m_password_label->SetLabel(m_prov.m_lbl_alt_password); m_password_label->SetLabel(m_prov.m_lbl_alt_password);
this->Layout(); this->Layout();
} }
m_password->SetValidator(wxTextValidator(wxFILTER_EMPTY));
} }
protected: protected:
@ -1150,6 +1148,10 @@ protected:
// Credential prompt mode & Using configured credentials // Credential prompt mode & Using configured credentials
m_password_label->Enable(false); m_password_label->Enable(false);
m_password ->Enable(false); m_password ->Enable(false);
} else {
// Configuration mode or using stored credentials. Enable controls.
m_password_label->Enable(true);
m_password ->Enable(true);
} }
return wxIdentityCredentialsPanel<_Tcred, _Tbase>::TransferDataToWindow(); return wxIdentityCredentialsPanel<_Tcred, _Tbase>::TransferDataToWindow();

View File

@ -241,88 +241,63 @@ wxEAPCredentialsConfigPanelBase::wxEAPCredentialsConfigPanelBase( wxWindow* pare
m_credentials_label->Wrap( FromDIP(440) ); m_credentials_label->Wrap( FromDIP(440) );
sb_credentials_vert->Add( m_credentials_label, 0, wxALL|wxEXPAND, FromDIP(5) ); sb_credentials_vert->Add( m_credentials_label, 0, wxALL|wxEXPAND, FromDIP(5) );
m_storage = new wxRadioButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Use from Credential &Manager"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); wxBoxSizer* sb_credentials_radio;
m_storage->SetToolTip( _("Select this option if you would like to use credentials stored in Windows Credential Manager") ); sb_credentials_radio = new wxBoxSizer( wxVERTICAL );
sb_credentials_vert->Add( m_storage, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, FromDIP(5) );
wxBoxSizer* sb_storage; wxBoxSizer* sb_storage;
sb_storage = new wxBoxSizer( wxVERTICAL ); sb_storage = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* sb_storage_identity; m_storage = new wxRadioButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Use from Credential &Manager:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
sb_storage_identity = new wxBoxSizer( wxHORIZONTAL ); m_storage->SetToolTip( _("Select this option if you would like to use credentials stored in Windows Credential Manager") );
m_storage_identity_label = new wxStaticText( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Identity:"), wxDefaultPosition, wxDefaultSize, 0 ); sb_storage->Add( m_storage, 0, wxEXPAND, FromDIP(5) );
m_storage_identity_label->Wrap( -1 );
sb_storage_identity->Add( m_storage_identity_label, 0, 0, FromDIP(5) );
m_storage_identity = new wxStaticText( m_sb_credentials->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_storage_identity = new wxStaticText( m_sb_credentials->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_storage_identity->Wrap( -1 ); m_storage_identity->Wrap( -1 );
m_storage_identity->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); m_storage_identity->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
m_storage_identity->SetToolTip( _("Your present credentials stored in Windows Credential Manager") ); m_storage_identity->SetToolTip( _("Your present credentials stored in Windows Credential Manager") );
sb_storage_identity->Add( m_storage_identity, 1, wxEXPAND|wxLEFT, FromDIP(5) ); sb_storage->Add( m_storage_identity, 1, wxEXPAND, FromDIP(5) );
sb_storage->Add( sb_storage_identity, 1, wxEXPAND, FromDIP(5) ); sb_credentials_radio->Add( sb_storage, 1, wxEXPAND|wxBOTTOM, FromDIP(5) );
wxBoxSizer* sb_buttons_storage;
sb_buttons_storage = new wxBoxSizer( wxHORIZONTAL );
m_storage_clear = new wxButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("&Clear Credentials"), wxDefaultPosition, wxDefaultSize, 0 );
m_storage_clear->SetToolTip( _("Click to clear your credentials from Credential Manager.\nNote: You will be prompted to enter credentials when connecting.") );
sb_buttons_storage->Add( m_storage_clear, 0, wxRIGHT, FromDIP(5) );
m_storage_set = new wxButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("&Set Credentials..."), wxDefaultPosition, wxDefaultSize, 0 );
m_storage_set->SetToolTip( _("Click here to set or modify your credentials") );
sb_buttons_storage->Add( m_storage_set, 0, wxLEFT, FromDIP(5) );
sb_storage->Add( sb_buttons_storage, 0, wxALIGN_RIGHT|wxTOP, FromDIP(5) );
sb_credentials_vert->Add( sb_storage, 0, wxEXPAND|wxALL, FromDIP(5) );
m_config = new wxRadioButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Use from &profile configuration"), wxDefaultPosition, wxDefaultSize, 0 );
m_config->SetToolTip( _("Select this option if you would like to store credentials as a part of profile configuration") );
sb_credentials_vert->Add( m_config, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, FromDIP(5) );
wxBoxSizer* sb_config; wxBoxSizer* sb_config;
sb_config = new wxBoxSizer( wxVERTICAL ); sb_config = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* sb_config_identity; m_config = new wxRadioButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Use from &profile configuration:"), wxDefaultPosition, wxDefaultSize, 0 );
sb_config_identity = new wxBoxSizer( wxHORIZONTAL ); m_config->SetToolTip( _("Select this option if you would like to store credentials as a part of profile configuration") );
m_config_identity_label = new wxStaticText( m_sb_credentials->GetStaticBox(), wxID_ANY, _("Identity:"), wxDefaultPosition, wxDefaultSize, 0 ); sb_config->Add( m_config, 0, wxEXPAND, FromDIP(5) );
m_config_identity_label->Wrap( -1 );
sb_config_identity->Add( m_config_identity_label, 0, 0, FromDIP(5) );
m_config_identity = new wxStaticText( m_sb_credentials->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_config_identity = new wxStaticText( m_sb_credentials->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_config_identity->Wrap( -1 ); m_config_identity->Wrap( -1 );
m_config_identity->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); m_config_identity->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
m_config_identity->SetToolTip( _("Profile configuration credentials") ); m_config_identity->SetToolTip( _("Profile configuration credentials") );
sb_config_identity->Add( m_config_identity, 1, wxEXPAND|wxLEFT, FromDIP(5) ); sb_config->Add( m_config_identity, 1, wxEXPAND, FromDIP(5) );
sb_config->Add( sb_config_identity, 1, wxEXPAND, FromDIP(5) ); sb_credentials_radio->Add( sb_config, 1, wxEXPAND|wxTOP, FromDIP(5) );
wxBoxSizer* sb_buttons_config;
sb_buttons_config = new wxBoxSizer( wxHORIZONTAL );
m_config_set = new wxButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("&Set Credentials..."), wxDefaultPosition, wxDefaultSize, 0 );
m_config_set->SetToolTip( _("Click here to set or modify your credentials") );
sb_buttons_config->Add( m_config_set, 0, 0, FromDIP(5) );
sb_config->Add( sb_buttons_config, 0, wxALIGN_RIGHT|wxTOP, FromDIP(5) ); sb_credentials_vert->Add( sb_credentials_radio, 0, wxEXPAND|wxALL, FromDIP(5) );
wxBoxSizer* sb_buttons_storage;
sb_buttons_storage = new wxBoxSizer( wxHORIZONTAL );
m_clear = new wxButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("&Clear Credentials"), wxDefaultPosition, wxDefaultSize, 0 );
m_clear->SetToolTip( _("Click to clear your credentials from Credential Manager.\nNote: You will be prompted to enter credentials when connecting.") );
sb_buttons_storage->Add( m_clear, 0, wxRIGHT, FromDIP(5) );
m_set = new wxButton( m_sb_credentials->GetStaticBox(), wxID_ANY, _("&Set Credentials..."), wxDefaultPosition, wxDefaultSize, 0 );
m_set->SetToolTip( _("Click here to set or modify your credentials") );
sb_buttons_storage->Add( m_set, 0, wxLEFT, FromDIP(5) );
sb_credentials_vert->Add( sb_config, 0, wxEXPAND|wxALL, FromDIP(5) ); sb_credentials_vert->Add( sb_buttons_storage, 0, wxALIGN_RIGHT|wxTOP, FromDIP(5) );
sb_credentials_horiz->Add( sb_credentials_vert, 1, wxEXPAND, FromDIP(5) ); sb_credentials_horiz->Add( sb_credentials_vert, 1, wxEXPAND, FromDIP(5) );
@ -337,9 +312,8 @@ wxEAPCredentialsConfigPanelBase::wxEAPCredentialsConfigPanelBase( wxWindow* pare
// Connect Events // Connect Events
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEAPCredentialsConfigPanelBase::OnUpdateUI ) ); this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEAPCredentialsConfigPanelBase::OnUpdateUI ) );
m_storage_clear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnClearStorage ), NULL, this ); m_clear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnClear ), NULL, this );
m_storage_set->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnSetStorage ), NULL, this ); m_set->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnSet ), NULL, this );
m_config_set->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnSetConfig ), NULL, this );
this->Connect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( wxEAPCredentialsConfigPanelBase::OnTimerStorage ) ); this->Connect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( wxEAPCredentialsConfigPanelBase::OnTimerStorage ) );
} }
@ -347,9 +321,8 @@ wxEAPCredentialsConfigPanelBase::~wxEAPCredentialsConfigPanelBase()
{ {
// Disconnect Events // Disconnect Events
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEAPCredentialsConfigPanelBase::OnUpdateUI ) ); this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEAPCredentialsConfigPanelBase::OnUpdateUI ) );
m_storage_clear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnClearStorage ), NULL, this ); m_clear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnClear ), NULL, this );
m_storage_set->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnSetStorage ), NULL, this ); m_set->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnSet ), NULL, this );
m_config_set->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPCredentialsConfigPanelBase::OnSetConfig ), NULL, this );
this->Disconnect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( wxEAPCredentialsConfigPanelBase::OnTimerStorage ) ); this->Disconnect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( wxEAPCredentialsConfigPanelBase::OnTimerStorage ) );
} }

View File

@ -1157,93 +1157,29 @@
<property name="wrap">440</property> <property name="wrap">440</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Use from Credential &amp;Manager</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_storage</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRB_GROUP</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Select this option if you would like to use credentials stored in Windows Credential Manager</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sb_storage</property> <property name="name">sb_credentials_radio</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sb_storage_identity</property> <property name="name">sb_storage</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag"></property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxRadioButton" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1271,8 +1207,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Identity:</property> <property name="label">Use from Credential &amp;Manager:</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1280,7 +1215,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_storage_identity_label</property> <property name="name">m_storage</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -1290,19 +1225,23 @@
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style">wxRB_GROUP</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip">Select this option if you would like to use credentials stored in Windows Credential Manager</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value">0</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1365,250 +1304,18 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxTOP</property> <property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">sb_buttons_storage</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">&amp;Clear Credentials</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_storage_clear</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Click to clear your credentials from Credential Manager.&#x0A;Note: You will be prompted to enter credentials when connecting.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnClearStorage</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">&amp;Set Credentials...</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_storage_set</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Click here to set or modify your credentials</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnSetStorage</event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Use from &amp;profile configuration</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_config</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Select this option if you would like to store credentials as a part of profile configuration</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">sb_config</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sb_config_identity</property> <property name="name">sb_config</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag"></property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxRadioButton" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1636,8 +1343,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Identity:</property> <property name="label">Use from &amp;profile configuration:</property>
<property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1645,7 +1351,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_config_identity_label</property> <property name="name">m_config</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -1658,16 +1364,20 @@
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip">Select this option if you would like to store credentials as a part of profile configuration</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value">0</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1728,88 +1438,161 @@
</object> </object>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxTOP</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">sb_buttons_storage</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxTOP</property> <property name="flag">wxRIGHT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">&amp;Clear Credentials</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sb_buttons_config</property> <property name="moveable">1</property>
<property name="orient">wxHORIZONTAL</property> <property name="name">m_clear</property>
<property name="permission">none</property> <property name="pane_border">1</property>
<object class="sizeritem" expanded="0"> <property name="pane_position"></property>
<property name="border">5</property> <property name="pane_size"></property>
<property name="flag"></property> <property name="permission">protected</property>
<property name="proportion">0</property> <property name="pin_button">1</property>
<object class="wxButton" expanded="0"> <property name="pos"></property>
<property name="BottomDockable">1</property> <property name="position"></property>
<property name="LeftDockable">1</property> <property name="pressed"></property>
<property name="RightDockable">1</property> <property name="resize">Resizable</property>
<property name="TopDockable">1</property> <property name="show">1</property>
<property name="aui_layer"></property> <property name="size"></property>
<property name="aui_name"></property> <property name="style"></property>
<property name="aui_position"></property> <property name="subclass"></property>
<property name="aui_row"></property> <property name="toolbar_pane">0</property>
<property name="best_size"></property> <property name="tooltip">Click to clear your credentials from Credential Manager.&#x0A;Note: You will be prompted to enter credentials when connecting.</property>
<property name="bg"></property> <property name="validator_data_type"></property>
<property name="bitmap"></property> <property name="validator_style">wxFILTER_NONE</property>
<property name="caption"></property> <property name="validator_type">wxDefaultValidator</property>
<property name="caption_visible">1</property> <property name="validator_variable"></property>
<property name="center_pane">0</property> <property name="window_extra_style"></property>
<property name="close_button">1</property> <property name="window_name"></property>
<property name="context_help"></property> <property name="window_style"></property>
<property name="context_menu">1</property> <event name="OnButtonClick">OnClear</event>
<property name="current"></property> </object>
<property name="default">0</property> </object>
<property name="default_pane">0</property> <object class="sizeritem" expanded="1">
<property name="disabled"></property> <property name="border">5</property>
<property name="dock">Dock</property> <property name="flag">wxLEFT</property>
<property name="dock_fixed">0</property> <property name="proportion">0</property>
<property name="docking">Left</property> <object class="wxButton" expanded="1">
<property name="enabled">1</property> <property name="BottomDockable">1</property>
<property name="fg"></property> <property name="LeftDockable">1</property>
<property name="floatable">1</property> <property name="RightDockable">1</property>
<property name="focus"></property> <property name="TopDockable">1</property>
<property name="font"></property> <property name="aui_layer"></property>
<property name="gripper">0</property> <property name="aui_name"></property>
<property name="hidden">0</property> <property name="aui_position"></property>
<property name="id">wxID_ANY</property> <property name="aui_row"></property>
<property name="label">&amp;Set Credentials...</property> <property name="best_size"></property>
<property name="margins"></property> <property name="bg"></property>
<property name="markup">0</property> <property name="bitmap"></property>
<property name="max_size"></property> <property name="caption"></property>
<property name="maximize_button">0</property> <property name="caption_visible">1</property>
<property name="maximum_size"></property> <property name="center_pane">0</property>
<property name="min_size"></property> <property name="close_button">1</property>
<property name="minimize_button">0</property> <property name="context_help"></property>
<property name="minimum_size"></property> <property name="context_menu">1</property>
<property name="moveable">1</property> <property name="current"></property>
<property name="name">m_config_set</property> <property name="default">0</property>
<property name="pane_border">1</property> <property name="default_pane">0</property>
<property name="pane_position"></property> <property name="disabled"></property>
<property name="pane_size"></property> <property name="dock">Dock</property>
<property name="permission">protected</property> <property name="dock_fixed">0</property>
<property name="pin_button">1</property> <property name="docking">Left</property>
<property name="pos"></property> <property name="enabled">1</property>
<property name="position"></property> <property name="fg"></property>
<property name="pressed"></property> <property name="floatable">1</property>
<property name="resize">Resizable</property> <property name="focus"></property>
<property name="show">1</property> <property name="font"></property>
<property name="size"></property> <property name="gripper">0</property>
<property name="style"></property> <property name="hidden">0</property>
<property name="subclass"></property> <property name="id">wxID_ANY</property>
<property name="toolbar_pane">0</property> <property name="label">&amp;Set Credentials...</property>
<property name="tooltip">Click here to set or modify your credentials</property> <property name="margins"></property>
<property name="validator_data_type"></property> <property name="markup">0</property>
<property name="validator_style">wxFILTER_NONE</property> <property name="max_size"></property>
<property name="validator_type">wxDefaultValidator</property> <property name="maximize_button">0</property>
<property name="validator_variable"></property> <property name="maximum_size"></property>
<property name="window_extra_style"></property> <property name="min_size"></property>
<property name="window_name"></property> <property name="minimize_button">0</property>
<property name="window_style"></property> <property name="minimum_size"></property>
<event name="OnButtonClick">OnSetConfig</event> <property name="moveable">1</property>
</object> <property name="name">m_set</property>
</object> <property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Click here to set or modify your credentials</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnSet</event>
</object> </object>
</object> </object>
</object> </object>

View File

@ -166,21 +166,17 @@ class wxEAPCredentialsConfigPanelBase : public wxPanel
wxStaticBitmap* m_credentials_icon; wxStaticBitmap* m_credentials_icon;
wxStaticText* m_credentials_label; wxStaticText* m_credentials_label;
wxRadioButton* m_storage; wxRadioButton* m_storage;
wxStaticText* m_storage_identity_label;
wxStaticText* m_storage_identity; wxStaticText* m_storage_identity;
wxButton* m_storage_clear;
wxButton* m_storage_set;
wxRadioButton* m_config; wxRadioButton* m_config;
wxStaticText* m_config_identity_label;
wxStaticText* m_config_identity; wxStaticText* m_config_identity;
wxButton* m_config_set; wxButton* m_clear;
wxButton* m_set;
wxTimer m_timer_storage; wxTimer m_timer_storage;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnClearStorage( wxCommandEvent& event ) { event.Skip(); } virtual void OnClear( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSetStorage( wxCommandEvent& event ) { event.Skip(); } virtual void OnSet( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSetConfig( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTimerStorage( wxTimerEvent& event ) { event.Skip(); } virtual void OnTimerStorage( wxTimerEvent& event ) { event.Skip(); }

View File

@ -37,6 +37,7 @@
class wxCertificateClientData; class wxCertificateClientData;
class wxCertificateHashClientData; class wxCertificateHashClientData;
class wxCertificateValidator;
class wxTLSCredentialsPanel; class wxTLSCredentialsPanel;
class wxTLSServerTrustPanel; class wxTLSServerTrustPanel;
class wxTLSConfigPanel; class wxTLSConfigPanel;
@ -104,6 +105,51 @@ public:
}; };
///
/// User certificate validator - checks if a (valid) user certificate is selected
///
class wxCertificateValidator : public wxValidator
{
public:
///
/// Construct the validator with a value to store data
///
wxCertificateValidator(wxCertificateHashClientData *val = NULL);
///
/// Copies this validator
///
virtual wxObject* Clone() const;
///
/// Validates the value
///
virtual bool Validate(wxWindow *parent);
///
/// Transfers the value to the window
///
virtual bool TransferToWindow();
///
/// Transfers the value from the window
///
virtual bool TransferFromWindow();
///
/// Parses FQDN list value
///
static bool Parse(const wxCertificateHashClientData *val_in, wxChoice *ctrl, wxWindow *parent, wxCertificateHashClientData *val_out = NULL);
protected:
wxCertificateHashClientData *m_val; ///< Pointer to variable to receive control's parsed value
private:
wxDECLARE_DYNAMIC_CLASS(wxCertificateValidator);
wxDECLARE_NO_ASSIGN_CLASS(wxCertificateValidator);
};
/// ///
/// TLS credential panel /// TLS credential panel
/// ///
@ -127,6 +173,9 @@ protected:
virtual bool TransferDataFromWindow(); virtual bool TransferDataFromWindow();
virtual void OnUpdateUI(wxUpdateUIEvent& event); virtual void OnUpdateUI(wxUpdateUIEvent& event);
/// \endcond /// \endcond
protected:
wxCertificateHashClientData m_certificate_val; ///< Client certificate hash value
}; };

View File

@ -39,6 +39,91 @@ wxCertificateClientData::~wxCertificateClientData()
} }
//////////////////////////////////////////////////////////////////////
// wxCertificateValidator
//////////////////////////////////////////////////////////////////////
wxIMPLEMENT_DYNAMIC_CLASS(wxCertificateValidator, wxValidator);
wxCertificateValidator::wxCertificateValidator(wxCertificateHashClientData *val) :
m_val(val),
wxValidator()
{
}
wxObject* wxCertificateValidator::Clone() const
{
return new wxCertificateValidator(*this);
}
bool wxCertificateValidator::Validate(wxWindow *parent)
{
wxChoice *ctrl = (wxChoice*)GetWindow();
if (!ctrl || !ctrl->IsEnabled()) return true;
int sel = ctrl->GetSelection();
const wxCertificateHashClientData *val =
sel != wxNOT_FOUND && ctrl->HasClientObjectData() ?
dynamic_cast<const wxCertificateHashClientData*>(ctrl->GetClientObject(sel)) :
NULL;
return Parse(val, ctrl, parent);
}
bool wxCertificateValidator::TransferToWindow()
{
wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxChoice)));
wxChoice *ctrl = (wxChoice*)GetWindow();
if (m_val) {
if (ctrl->HasClientObjectData()) {
for (unsigned int i = 0, n = ctrl->GetCount(); i < n; i++) {
const wxCertificateHashClientData *val = dynamic_cast<const wxCertificateHashClientData*>(ctrl->GetClientObject(i));
if (val && m_val->m_cert_hash == val->m_cert_hash) {
ctrl->SetSelection(i);
return true;
}
}
}
ctrl->SetSelection(wxNOT_FOUND);
}
return true;
}
bool wxCertificateValidator::TransferFromWindow()
{
wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxChoice)));
wxChoice *ctrl = (wxChoice*)GetWindow();
int sel = ctrl->GetSelection();
const wxCertificateHashClientData *val =
sel != wxNOT_FOUND && ctrl->HasClientObjectData() ?
dynamic_cast<const wxCertificateHashClientData*>(ctrl->GetClientObject(sel)) :
NULL;
return Parse(val, ctrl, NULL, m_val);
}
bool wxCertificateValidator::Parse(const wxCertificateHashClientData *val_in, wxChoice *ctrl, wxWindow *parent, wxCertificateHashClientData *val_out)
{
if (!val_in) {
ctrl->SetFocus();
wxMessageBox(_("No certificate selected"), _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
return false;
}
if (val_out) val_out->m_cert_hash = val_in->m_cert_hash;
return true;
}
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// wxTLSCredentialsPanel // wxTLSCredentialsPanel
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
@ -50,16 +135,8 @@ wxTLSCredentialsPanel::wxTLSCredentialsPanel(const eap::config_provider &prov, c
winstd::library lib_shell32; winstd::library lib_shell32;
if (lib_shell32.load(_T("certmgr.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE)) if (lib_shell32.load(_T("certmgr.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE))
m_credentials_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(6170))); m_credentials_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(6170)));
}
/// \cond internal
bool wxTLSCredentialsPanel::TransferDataToWindow()
{
// Populate certificate list. // Populate certificate list.
m_certificate->Append(_("(none)"), (wxCertificateHashClientData*)NULL);
bool is_found = false;
winstd::cert_store store; winstd::cert_store store;
if (store.create(CERT_STORE_PROV_SYSTEM, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, (HCRYPTPROV)NULL, CERT_SYSTEM_STORE_CURRENT_USER, _T("My"))) { if (store.create(CERT_STORE_PROV_SYSTEM, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, (HCRYPTPROV)NULL, CERT_SYSTEM_STORE_CURRENT_USER, _T("My"))) {
for (PCCERT_CONTEXT cert = NULL; (cert = CertEnumCertificatesInStore(store, cert)) != NULL;) { for (PCCERT_CONTEXT cert = NULL; (cert = CertEnumCertificatesInStore(store, cert)) != NULL;) {
@ -77,18 +154,21 @@ bool wxTLSCredentialsPanel::TransferDataToWindow()
} }
// Add to list. // Add to list.
bool is_selected = m_cred.m_cert_hash == data->m_cert_hash;
winstd::tstring name(std::move(eap::get_cert_title(cert))); winstd::tstring name(std::move(eap::get_cert_title(cert)));
int i = m_certificate->Append(name, data.release()); m_certificate->Append(name, data.release());
if (is_selected) {
m_certificate->SetSelection(i);
is_found = true;
}
} }
} }
if (!is_found) m_certificate->SetValidator(wxCertificateValidator(&m_certificate_val));
m_certificate->SetSelection(0); }
/// \cond internal
bool wxTLSCredentialsPanel::TransferDataToWindow()
{
// Set client certificate hash. The wxChoice control will set selection using validator.
m_certificate_val.m_cert_hash = m_cred.m_cert_hash;
m_identity->SetValue(m_cred.m_identity); m_identity->SetValue(m_cred.m_identity);
@ -98,22 +178,13 @@ bool wxTLSCredentialsPanel::TransferDataToWindow()
bool wxTLSCredentialsPanel::TransferDataFromWindow() bool wxTLSCredentialsPanel::TransferDataFromWindow()
{ {
// Check if m_certificate control has selected item, and has client object data (at least one user certificate on the list). Then try to get the data from selected item. if (!wxEAPCredentialsPanel<eap::credentials_tls, wxTLSCredentialsPanelBase>::TransferDataFromWindow())
int sel = m_certificate->GetSelection(); return false;
const wxCertificateHashClientData *data =
sel != wxNOT_FOUND && m_certificate->HasClientObjectData() ?
dynamic_cast<const wxCertificateHashClientData*>(m_certificate->GetClientObject(sel)) :
NULL;
if (data)
m_cred.m_cert_hash = data->m_cert_hash;
else
m_cred.m_cert_hash.clear();
m_cred.m_identity = m_identity->GetValue(); m_cred.m_cert_hash = m_certificate_val.m_cert_hash;
m_cred.m_identity = m_identity->GetValue();
// Inherited TransferDataFromWindow() calls m_cred.store(). return true;
// Therefore, call it only now, that m_cred is set.
return wxEAPCredentialsPanel<eap::credentials_tls, wxTLSCredentialsPanelBase>::TransferDataFromWindow();
} }