summaryrefslogtreecommitdiffstats
path: root/src/certconfigpage.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-06-06 04:16:24 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-06-06 04:16:24 -0500
commit75044dd48af51f848e49f6705ec6e9423571dd8c (patch)
treea973bc28051a6706dc6e28f807538bc3e8f3488c /src/certconfigpage.cpp
parentbf4dbda9682241deffb3ec704e2597a12496d2a8 (diff)
downloadkcmldapcontroller-75044dd48af51f848e49f6705ec6e9423571dd8c.tar.gz
kcmldapcontroller-75044dd48af51f848e49f6705ec6e9423571dd8c.zip
Add ssl generation and storage
Diffstat (limited to 'src/certconfigpage.cpp')
-rw-r--r--src/certconfigpage.cpp36
1 files changed, 32 insertions, 4 deletions
diff --git a/src/certconfigpage.cpp b/src/certconfigpage.cpp
index 1e94336..2a5b6e6 100644
--- a/src/certconfigpage.cpp
+++ b/src/certconfigpage.cpp
@@ -48,11 +48,20 @@ CertConfigPage::CertConfigPage(TQWidget *parent, const char *name ) : CertConfig
connect(generateKeysDisabled, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(setUseProvidedKeys(int)));
connect(kerberosPEM, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(kerberosPEMKEY, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
connect(kerberosCRT, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
connect(kerberosKEY, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
connect(ldapCRT, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
connect(ldapKEY, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(organizationName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(orgUnitName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(commonName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(localityName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(stateOrProvinceName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(countryName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(emailAddress, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+
m_parentWizard = dynamic_cast<KWizard*>(parent);
m_parentDialog = dynamic_cast<KDialogBase*>(parent);
}
@@ -81,19 +90,33 @@ void CertConfigPage::setUseProvidedKeys(int state) {
void CertConfigPage::processLockouts() {
kerberosPEM->setEnabled(generateKeysDisabled->isOn());
+ kerberosPEMKEY->setEnabled(generateKeysDisabled->isOn());
kerberosCRT->setEnabled(generateKeysDisabled->isOn());
kerberosKEY->setEnabled(generateKeysDisabled->isOn());
ldapCRT->setEnabled(generateKeysDisabled->isOn());
ldapKEY->setEnabled(generateKeysDisabled->isOn());
+
+ organizationName->setEnabled(generateKeysEnabled->isOn());
+ orgUnitName->setEnabled(generateKeysEnabled->isOn());
+ commonName->setEnabled(generateKeysEnabled->isOn());
+ localityName->setEnabled(generateKeysEnabled->isOn());
+ stateOrProvinceName->setEnabled(generateKeysEnabled->isOn());
+ countryName->setEnabled(generateKeysEnabled->isOn());
+ emailAddress->setEnabled(generateKeysEnabled->isOn());
}
void CertConfigPage::validateEntries() {
if (m_parentWizard) {
if (generateKeysEnabled->isOn()) {
- m_parentWizard->nextButton()->setEnabled(true);
+ if ((organizationName->text() != "") && (orgUnitName->text() != "") && (commonName->text() != "") && (localityName->text() != "") && (stateOrProvinceName->text() != "") && (countryName->text() != "") && (emailAddress->text() != "")) {
+ m_parentWizard->nextButton()->setEnabled(true);
+ }
+ else {
+ m_parentWizard->nextButton()->setEnabled(false);
+ }
}
else {
- if ((kerberosPEM->url() != "") && (kerberosCRT->url() != "") && (kerberosKEY->url() != "") && (ldapCRT->url() != "") && (ldapKEY->url() != "")) {
+ if ((kerberosPEM->url() != "") && (kerberosPEMKEY->url() != "") && (kerberosCRT->url() != "") && (kerberosKEY->url() != "") && (ldapCRT->url() != "") && (ldapKEY->url() != "")) {
m_parentWizard->nextButton()->setEnabled(true);
}
else {
@@ -103,10 +126,15 @@ void CertConfigPage::validateEntries() {
}
if (m_parentDialog) {
if (generateKeysEnabled->isOn()) {
- m_parentDialog->enableButton(KDialogBase::Ok, true);
+ if ((organizationName->text() != "") && (orgUnitName->text() != "") && (commonName->text() != "") && (localityName->text() != "") && (stateOrProvinceName->text() != "") && (countryName->text() != "") && (emailAddress->text() != "")) {
+ m_parentDialog->enableButton(KDialogBase::Ok, true);
+ }
+ else {
+ m_parentDialog->enableButton(KDialogBase::Ok, false);
+ }
}
else {
- if ((kerberosPEM->url() != "") && (kerberosCRT->url() != "") && (kerberosKEY->url() != "") && (ldapCRT->url() != "") && (ldapKEY->url() != "")) {
+ if ((kerberosPEM->url() != "") && (kerberosPEMKEY->url() != "") && (kerberosCRT->url() != "") && (kerberosKEY->url() != "") && (ldapCRT->url() != "") && (ldapKEY->url() != "")) {
m_parentDialog->enableButton(KDialogBase::Ok, true);
}
else {