Skip to content
Permalink
Browse files

Merge pull request #2800 from Kissaki/cert-pw

CertWizard: Password requirement notice on import
  • Loading branch information...
Kissaki committed Feb 1, 2017
2 parents 039096a + c083432 commit 8f94c763abdfd3843fd2bee4b010ed12aaf356c8
Showing with 27 additions and 0 deletions.
  1. +9 −0 src/mumble/Cert.cpp
  2. +18 −0 src/mumble/Cert.ui
@@ -120,6 +120,7 @@ CertWizard::CertWizard(QWidget *p) : QWizard(p) {

qwpExport->setCommitPage(true);
qwpExport->setComplete(false);
qlPasswordNotice->setVisible(false);
}

int CertWizard::nextId() const {
@@ -305,6 +306,8 @@ void CertWizard::on_qleImportFile_textChanged(const QString &text) {
qlePassword->clear();
qlePassword->setEnabled(false);
qlPassword->setEnabled(false);
qlPasswordNotice->clear();
qlPasswordNotice->setVisible(false);
qwpImport->setComplete(false);
return;
}
@@ -318,17 +321,23 @@ void CertWizard::on_qleImportFile_textChanged(const QString &text) {
if (validateCert(imp)) {
qlePassword->setEnabled(false);
qlPassword->setEnabled(false);
qlPasswordNotice->clear();
qlPasswordNotice->setVisible(false);
cvImport->setCert(imp.first);
qwpImport->setComplete(true);
return;
} else {
qlePassword->setEnabled(true);
qlPassword->setEnabled(true);
qlPasswordNotice->setText(tr("Unable to import. Missing password or incompatible file type."));
qlPasswordNotice->setVisible(true);
}
} else {
qlePassword->clear();
qlePassword->setEnabled(false);
qlPassword->setEnabled(false);
qlPasswordNotice->clear();
qlPasswordNotice->setVisible(false);
}
cvImport->setCert(QList<QSslCertificate>());
qwpImport->setComplete(false);
@@ -227,6 +227,24 @@ It is &lt;b&gt;strongly&lt;/b&gt; recommended that you &lt;a href=&quot;http://m
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QLabel" name="qlPasswordNotice">
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">color:#ff0000;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="CertView" name="cvImport">
<property name="toolTip">
<string>Certificate to import</string>

0 comments on commit 8f94c76

Please sign in to comment.
You can’t perform that action at this time.