Skip to content

Commit 0145e7b

Browse files
committed
added remaining 1.38 items to provisioning editor
1 parent 65ceb1a commit 0145e7b

File tree

6 files changed

+48
-10
lines changed

6 files changed

+48
-10
lines changed

apps/cmstapp/code/provisioning/prov_ed.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ ProvisioningEditor::ProvisioningEditor(QWidget* parent, const float& ver) : QDia
8181
group_freeform->addAction(ui.actionWifiPrivateKeyPassphrase);
8282
group_freeform->addAction(ui.actionWifiIdentity);
8383
group_freeform->addAction(ui.actionWifiAnonymousIdentity);
84-
group_freeform->addAction(ui.actionWifiSubjectMatch);
8584
group_freeform->addAction(ui.actionWifiPassphrase);
8685
group_freeform->addAction(ui.actionWifiPhase2);
8786
group_freeform->addAction(ui.actionServiceDeviceName);
@@ -105,6 +104,10 @@ ProvisioningEditor::ProvisioningEditor(QWidget* parent, const float& ver) : QDia
105104
group_validated->addAction(ui.actionServiceSearchDomains);
106105
group_validated->addAction(ui.actionServiceDomain);
107106
group_validated->addAction(ui.actionWifiName);
107+
group_validated->addAction(ui.actionWifiSubjectMatch);
108+
group_validated->addAction(ui.actionWifiAltSubjectMatch);
109+
group_validated->addAction(ui.actionWifiDomainMatch);
110+
group_validated->addAction(ui.actionWifiDomainSuffixMatch);
108111

109112
group_selectfile = new QActionGroup(this);
110113
group_selectfile->addAction(ui.actionWifiCACertFile);
@@ -153,6 +156,9 @@ ProvisioningEditor::ProvisioningEditor(QWidget* parent, const float& ver) : QDia
153156
if (ver > 1.37f) {
154157
menu_wifi->addAction(ui.actionWifiAnonymousIdentity);
155158
menu_wifi->addAction(ui.actionWifiSubjectMatch);
159+
menu_wifi->addAction(ui.actionWifiAltSubjectMatch);
160+
menu_wifi->addAction(ui.actionWifiDomainMatch);
161+
menu_wifi->addAction(ui.actionWifiDomainSuffixMatch);
156162
}
157163
menu_wifi->addSeparator();
158164
menu_wifi->addAction(ui.actionWifiCACertFile);
@@ -222,6 +228,7 @@ void ProvisioningEditor::inputValidated(QAction* act)
222228
{
223229
// variables
224230
QString key = act->text();
231+
QChar delim(','); // default delim character for plurals
225232

226233
// create the dialog
227234
shared::ValidatingDialog* vd = new shared::ValidatingDialog(this);
@@ -233,7 +240,11 @@ void ProvisioningEditor::inputValidated(QAction* act)
233240
if (act == ui.actionServiceTimeServers) {vd->setLabel(tr("List of Timeservers")); vd->setValidator(CMST::ValDialog_46d, true);}
234241
if (act == ui.actionServiceSearchDomains) {vd->setLabel(tr("List of DNS Search Domains")); vd->setValidator(CMST::ValDialog_Dom, true);}
235242
if (act == ui.actionServiceDomain) {vd->setLabel(tr("Domain name to be used")); vd->setValidator(CMST::ValDialog_Dom);}
236-
if (act == ui.actionWifiName) {vd->setLabel(tr("Enter the string representation of an 802.11 SSID.")); vd->setValidator(CMST::ValDialog_Wd);}
243+
if (act == ui.actionWifiName) {vd->setLabel(tr("Enter the string representation of an 802.11 SSID.")); vd->setValidator(CMST::ValDialog_Word);}
244+
if (act == ui.actionWifiSubjectMatch) { vd->setLabel(tr("Substring to be matched against the subject of the authentication server")); vd->setValidator(CMST::ValDialog_Word);}
245+
if (act == ui.actionWifiAltSubjectMatch) {vd->setLabel(tr("List of entries to be matched against the alternative subject name.")); vd->setValidator(CMST::ValDialog_Word, true); delim=';';}
246+
if (act == ui.actionWifiDomainMatch) {vd->setLabel(tr("A fully qualified domain name used as a full match requirement for the authentication server")); vd->setValidator(CMST::ValDialog_Dom);}
247+
if (act == ui.actionWifiDomainSuffixMatch) {vd->setLabel(tr("A fully qualified domain name used as a suffix match requirement for the authentication server")); vd->setValidator(CMST::ValDialog_Dom);}
237248

238249
// if accepted put an entry in the textedit
239250
if (vd->exec() == QDialog::Accepted) {
@@ -245,7 +256,7 @@ void ProvisioningEditor::inputValidated(QAction* act)
245256
s.replace(',', ' ');
246257
s.replace(';', ' ');
247258
s = s.simplified();
248-
s.replace(' ', ',');
259+
s.replace(' ', delim);
249260
}
250261

251262
ui.plainTextEdit_main->insertPlainText(key.arg(s) );
@@ -315,6 +326,7 @@ void ProvisioningEditor::inputFreeForm(QAction* act)
315326
if (act == ui.actionGlobalDescription) str = tr("Enter a description of the network.");
316327
if (act == ui.actionWifiPrivateKeyPassphrase) str = tr("Password/Passphrase for the private key file.");
317328
if (act == ui.actionWifiIdentity) str = tr("Identity string for EAP.");
329+
if (act == ui.actionWifiAnonymousIdentity) str = tr("Anonymous identity string for EAP.");
318330
if (act == ui.actionWifiPassphrase) str = tr("RSN/WPA/WPA2 Passphrase");
319331
if (act == ui.actionWifiPhase2) str = tr("Phase 2 (inner authentication with TLS tunnel)<br>authentication method.");
320332
if (act == ui.actionServiceDeviceName) str = tr("The interface name in which to apply the provisioning (ex. eth0)") ;

apps/cmstapp/code/provisioning/ui/provisioning_editor.ui

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,30 @@
394394
<string>Substring to be matched against the subject of the authentication server certificate for EAP</string>
395395
</property>
396396
</action>
397+
<action name="actionWifiAltSubjectMatch">
398+
<property name="text">
399+
<string>AltSubjectMatch</string>
400+
</property>
401+
<property name="toolTip">
402+
<string>Semicolon separated string of entries to be matched against the alternative subject name of the authentication server certificate for EAP</string>
403+
</property>
404+
</action>
405+
<action name="actionWifiDomainSuffixMatch">
406+
<property name="text">
407+
<string>DomainSuffixMatch</string>
408+
</property>
409+
<property name="toolTip">
410+
<string>A FQDN used as a suffix match requirement for the authentication server.</string>
411+
</property>
412+
</action>
413+
<action name="actionWifiDomainMatch">
414+
<property name="text">
415+
<string>DomainMatch</string>
416+
</property>
417+
<property name="toolTip">
418+
<string>A FQDN used as a full match requirement for the authentication server.</string>
419+
</property>
420+
</action>
397421
</widget>
398422
<resources/>
399423
<connections>

apps/cmstapp/code/shared/shared.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,12 @@ void shared::ValidatingDialog::setValidator(const int& vd, bool plural)
129129
const QString s_hex = "[0-9a-fA-F]*";
130130
const QString s_int = "[0-9]*";
131131
const QString s_dom = "((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,6}";
132-
const QString s_wd = "[0-9,a-zA-Z_\\.\\!\\@\\#\\$\\%\\^\\&\\*\\+\\-]*";
132+
const QString s_word = "[0-9,a-zA-Z_\\.\\!\\@\\#\\$\\%\\^\\&\\*\\+\\-]*";
133133
const QString s_ch = "\\S";
134134
const QString s_start = (plural ? "\\s?|(" : "^");
135135
const QString s_end = (plural ? "(\\s*|[,|;|\\s]\\s*|$))+" : "$");
136136

137+
137138
switch (vd){
138139
case CMST::ValDialog_IPv4: {
139140
QRegularExpression rx4(s_start + s_ip4 + "(?:\\." + s_ip4 + "){3}" + s_end);
@@ -183,8 +184,8 @@ void shared::ValidatingDialog::setValidator(const int& vd, bool plural)
183184
lineedit->setValidator(lev_dom);
184185
lev_dom->deleteLater(); }
185186
break;
186-
case CMST::ValDialog_Wd: {
187-
QRegularExpression rxwd(s_start + s_wd + s_end);
187+
case CMST::ValDialog_Word: {
188+
QRegularExpression rxwd(s_start + s_word + s_end);
188189
QRegularExpressionValidator* lev_wd = new QRegularExpressionValidator(rxwd, this);
189190
lineedit->setValidator(lev_wd);
190191
lev_wd->deleteLater(); }

apps/cmstapp/code/vpn_prov_ed/vpn_ed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ void VPN_Editor::inputFreeForm(QAction* act, QString key)
565565

566566
// create some prompts
567567
if (key == "Name") str = tr("User defined name for the VPN");
568-
else if (key == "Domain") str = tr("Domain name for the VPN Service\n(example: corporate.com)");
568+
else if (key == "Domain") str = tr("Domain name for the VPN Service\n(ex: corporate.com)");
569569
else if (key == "Networks") str = tr("Networks behind the VPN link, if more than one separate by a comma.\n"
570570
"Format is network/netmask/gateway, and gateway can be omitted.\n"
571571
"Ex: 10.10.20.0/255.255.255.0/10.20.1.5,192.168.99.1/24,2001:Ldb8::1/16\n\n"

apps/resource.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ DEALINGS IN THE SOFTWARE.
3535
///////////////////////////////// Program Values ///////////////////////
3636
//
3737
// Program Info (may be visible, but don't mark for tranalation)
38-
#define VERSION "2020.03.02-1"
38+
#define VERSION "2020.03.03-1"
3939

4040
#define RELEASE_DATE "1 January 2020"
4141
#define COPYRIGHT_DATE "2013-2020"
@@ -91,7 +91,7 @@ namespace CMST
9191
ValDialog_Hex = 0x06,
9292
ValDialog_Int = 0x07,
9393
ValDialog_Dom = 0x08,
94-
ValDialog_Wd = 0x09,
94+
ValDialog_Word = 0x09,
9595
ValDialog_min1ch = 0x0a,
9696
ValDialog_min8ch = 0x0b,
9797
ValDialog_46d = 0x0c,

text/changelog.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
<li>Added mDNS setting to the provisioning editor.</li>
1818
<li>Added DeviceName field to the provisioning editor.<li>
1919
<li>Added AnonymousIdentity field to the wifi secion of the provisioning editor.<li>
20-
<li>Added SubjectMatch field to the wifi section of the provisioning editor. <li>
20+
<li>Added SubjectMatch and AltSubjectMatch fields to the wifi section of the provisioning editor. <li>
21+
<li>Added DomainMatch and DomainSuffixMatch fields to the wifi section of the provisioning editor. </li>
2122
</ul>
2223
</ul>
2324
<b> 2019.01.13</b>

0 commit comments

Comments
 (0)