Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:hschaa:Factory
NetworkManager-kde
fix_use_system_cert.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix_use_system_cert.patch of Package NetworkManager-kde
Index: knetworkmanager/src/knetworkmanager-connection_setting_8021x.h =================================================================== --- knetworkmanager/src/knetworkmanager-connection_setting_8021x.h (Revision 908142) +++ knetworkmanager/src/knetworkmanager-connection_setting_8021x.h (Revision 908143) @@ -144,6 +144,9 @@ QString getCaPath(void) const; void setCaPath(QString); + bool getUseSystemCaCert(void) const; + void setUseSystemCaCert(bool); + //FIXME // client cert @@ -166,6 +169,7 @@ QString _identity; QString _anonIdentity; QByteArray _caCert; + bool _useSystemCaCert; QString _caPath; QByteArray _clientCert; QByteArray _privateKey; Index: knetworkmanager/src/knetworkmanager-connection_setting_wireless_security_widget.h =================================================================== --- knetworkmanager/src/knetworkmanager-connection_setting_wireless_security_widget.h (Revision 908142) +++ knetworkmanager/src/knetworkmanager-connection_setting_wireless_security_widget.h (Revision 908143) @@ -158,6 +158,7 @@ void slotIdentityChanged(const QString&); void slotAnonIdentityChanged(const QString&); void slotPasswordChanged(const QString&); + void slotUseSystemCaCertChanged(bool on); private: IEEE8021x* _security_setting; Index: knetworkmanager/src/knetworkmanager-connection_setting_8021x.cpp =================================================================== --- knetworkmanager/src/knetworkmanager-connection_setting_8021x.cpp (Revision 908142) +++ knetworkmanager/src/knetworkmanager-connection_setting_8021x.cpp (Revision 908143) @@ -62,6 +62,7 @@ , _eapPhase2(EAP_PHASE2_AUTH_NONE) , _phase2AuthEAP(QString::null) , _phase2CaPath(QString::null) + , _useSystemCaCert(false) { // init eap map _eapMap[EAP_NONE] = QString::null; @@ -120,6 +121,18 @@ return _password; } +bool +IEEE8021x::getUseSystemCaCert(void) const +{ + return _useSystemCaCert; +} + +void +IEEE8021x::setUseSystemCaCert(bool use) +{ + _useSystemCaCert = use; +} + IEEE8021x::EAP_PHASE1 IEEE8021x::getEAP(void) const { @@ -178,6 +191,8 @@ if (!_caPath.isEmpty()) map.insert(NM_SETTING_802_1X_CA_PATH, QDBusData::fromString(_caPath)); + map.insert(NM_SETTING_802_1X_SYSTEM_CA_CERTS, QDBusData::fromBool(_useSystemCaCert)); + //FIXME /* if (!_clientCert.isNull()) @@ -286,6 +301,8 @@ _phase2AuthEAP = it.data().toString(); else if (it.key() == NM_SETTING_802_1X_PHASE2_CA_PATH) _phase2CaPath = it.data().toString(); + else if (it.key() == NM_SETTING_802_1X_SYSTEM_CA_CERTS) + _useSystemCaCert = it.data().toBool(); else kdWarning() << k_funcinfo << " Unknown setting: " << it.key() << endl; } Index: knetworkmanager/src/knetworkmanager-connection_setting_wireless_security_widget.cpp =================================================================== --- knetworkmanager/src/knetworkmanager-connection_setting_wireless_security_widget.cpp (Revision 908142) +++ knetworkmanager/src/knetworkmanager-connection_setting_wireless_security_widget.cpp (Revision 908143) @@ -517,13 +517,23 @@ txtAnonIdentity->setText(_security_setting->getAnonIdentity()); txtPassword->setText(_security_setting->getPassword()); + chkCAStore->setChecked(_security_setting->getUseSystemCaCert()); + kURLCACert->setEnabled(!_security_setting->getUseSystemCaCert()); + // get notified if the method changes connect(cboMethod, SIGNAL(activated(int)), this, SLOT(slotMethodChanged(int))); connect(txtIdentity, SIGNAL(textChanged(const QString&)), this, SLOT(slotIdentityChanged(const QString&))); connect(txtAnonIdentity, SIGNAL(textChanged(const QString&)), this, SLOT(slotAnonIdentityChanged(const QString&))); connect(txtPassword, SIGNAL(textChanged(const QString&)), this, SLOT(slotPasswordChanged(const QString&))); + connect(chkCAStore, SIGNAL(toggled(bool)), this, SLOT(slotUseSystemCaCertChanged(bool))); } +void WirelessSecurityEAPImpl::slotUseSystemCaCertChanged(bool on) +{ + _security_setting->setUseSystemCaCert(on); + kURLCACert->setEnabled(!on); +} + void WirelessSecurityEAPImpl::slotMethodChanged(int index) { // new method choosen Index: knetworkmanager/src/connection_setting_wireless_security_eap.ui =================================================================== --- knetworkmanager/src/connection_setting_wireless_security_eap.ui (Revision 908142) +++ knetworkmanager/src/connection_setting_wireless_security_eap.ui (Revision 908143) @@ -8,8 +8,8 @@ <rect> <x>0</x> <y>0</y> - <width>493</width> - <height>180</height> + <width>583</width> + <height>174</height> </rect> </property> <property name="caption"> @@ -80,6 +80,24 @@ <string>Password:</string> </property> </widget> + <widget class="KPasswordEdit" row="3" column="1"> + <property name="name"> + <cstring>txtPassword</cstring> + </property> + </widget> + <widget class="QLabel" row="4" column="0"> + <property name="name"> + <cstring>textLabel16</cstring> + </property> + <property name="text"> + <string>Private Secret Key:</string> + </property> + </widget> + <widget class="KPasswordEdit" row="4" column="1"> + <property name="name"> + <cstring>txtPrivateSecretKey</cstring> + </property> + </widget> <widget class="QLabel" row="0" column="2"> <property name="name"> <cstring>textLabel12</cstring> @@ -88,15 +106,17 @@ <string>Client Certificate:</string> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="KURLRequester" row="0" column="3"> <property name="name"> - <cstring>textLabel14</cstring> + <cstring>kURLClientCert</cstring> </property> - <property name="text"> - <string>CA Certificate:</string> + </widget> + <widget class="KURLRequester" row="1" column="3"> + <property name="name"> + <cstring>kURLPrivateKey</cstring> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="QLabel" row="1" column="2"> <property name="name"> <cstring>textLabel15</cstring> </property> @@ -106,35 +126,31 @@ </widget> <widget class="QLabel" row="3" column="2"> <property name="name"> - <cstring>textLabel16</cstring> + <cstring>textLabel14</cstring> </property> <property name="text"> - <string>Private Secret Key:</string> + <string>CA Certificate:</string> </property> </widget> - <widget class="KPasswordEdit" row="3" column="1"> + <widget class="KURLRequester" row="3" column="3"> <property name="name"> - <cstring>txtPassword</cstring> + <cstring>kURLCACert</cstring> </property> </widget> - <widget class="KURLRequester" row="0" column="3"> + <widget class="QLabel" row="2" column="2"> <property name="name"> - <cstring>kURLClientCert</cstring> + <cstring>textLabel1</cstring> </property> - </widget> - <widget class="KURLRequester" row="1" column="3"> - <property name="name"> - <cstring>kURLCACert</cstring> + <property name="text"> + <string>Use System CA Certificates</string> </property> </widget> - <widget class="KURLRequester" row="2" column="3"> + <widget class="QCheckBox" row="2" column="3"> <property name="name"> - <cstring>kURLPrivateKey</cstring> + <cstring>chkCAStore</cstring> </property> - </widget> - <widget class="KPasswordEdit" row="3" column="3"> - <property name="name"> - <cstring>txtPrivateSecretKey</cstring> + <property name="text"> + <string></string> </property> </widget> </grid> @@ -143,6 +159,5 @@ </widget> <layoutdefaults spacing="6" margin="11"/> <includehints> - </includehints> </UI>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor