summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2015-01-20 22:26:14 +0000
committerJohannes Huber <johu@gentoo.org>2015-01-20 22:26:14 +0000
commit34da8ec9572460c52f778d25e54512e3c2aa928e (patch)
treeaf6bd4c4807748c5a1468dfa805e4ee450c45058
parentEvolution (not only eds) also checks and links to libical (#537158 by Anton G... (diff)
downloadhistorical-34da8ec9572460c52f778d25e54512e3c2aa928e.tar.gz
historical-34da8ec9572460c52f778d25e54512e3c2aa928e.tar.bz2
historical-34da8ec9572460c52f778d25e54512e3c2aa928e.zip
Revision bump adds upstream patch to fix build with openconnect-7, bug #532382.
Package-Manager: portage-2.2.15/cvs/Linux x86_64 Manifest-Sign-Key: 0xF3CFD2BD
-rw-r--r--kde-misc/networkmanagement/ChangeLog12
-rw-r--r--kde-misc/networkmanagement/Manifest30
-rw-r--r--kde-misc/networkmanagement/files/networkmanagement-0.9.0.11-openconnect7.patch367
-rw-r--r--kde-misc/networkmanagement/networkmanagement-0.9.0.11-r1.ebuild43
4 files changed, 436 insertions, 16 deletions
diff --git a/kde-misc/networkmanagement/ChangeLog b/kde-misc/networkmanagement/ChangeLog
index 2d1708bfc46a..4001824667c7 100644
--- a/kde-misc/networkmanagement/ChangeLog
+++ b/kde-misc/networkmanagement/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for kde-misc/networkmanagement
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-misc/networkmanagement/ChangeLog,v 1.47 2014/08/14 17:30:07 johu Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/kde-misc/networkmanagement/ChangeLog,v 1.48 2015/01/20 22:26:06 johu Exp $
+
+*networkmanagement-0.9.0.11-r1 (20 Jan 2015)
+
+ 20 Jan 2015; Johannes Huber <johu@gentoo.org>
+ +files/networkmanagement-0.9.0.11-openconnect7.patch,
+ +networkmanagement-0.9.0.11-r1.ebuild:
+ Revision bump adds upstream patch to fix build with openconnect-7, bug
+ #532382.
14 Aug 2014; Johannes Huber <johu@gentoo.org>
-networkmanagement-0.9.0.10.ebuild:
diff --git a/kde-misc/networkmanagement/Manifest b/kde-misc/networkmanagement/Manifest
index e0cd9f63487b..ade9fd7b3071 100644
--- a/kde-misc/networkmanagement/Manifest
+++ b/kde-misc/networkmanagement/Manifest
@@ -1,24 +1,26 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
+AUX networkmanagement-0.9.0.11-openconnect7.patch 14059 SHA256 d3243651b431051a3bf40ee3d632b44cae9d52057a609b987799b8fdcaf1838c SHA512 e8f824e4ec021e6c1fbe6b217e049732f5d2a22c0d80959f0db4cbff714ac24a69cddf2926f19abb75a207b4012334e6c67bf20e499da942a11b76b01c99af4f WHIRLPOOL e77dc0a634d26ccb83c98b346ece58289afb93baabe6b564d7507e984cdeee1f4503a84636004b419dbc5e53a82321dd7b6ccf8647e7774e450c7feb5fe3a7f1
DIST networkmanagement-0.9.0.11.tar.xz 1194216 SHA256 51f4f4d82d2475338f90bea7177d8cec92c9635809f4d5764c815e4ca3a6d33c SHA512 d1c7c7702f25e88db4a680f7131e4981b6bc0a5d29359d6a4ccbd35f60fd2fcdae0db4c2621315056696c63bbe29bdc5ed071f17d7e94d10cd6440e0a2435e98 WHIRLPOOL 16fb27467421f7d57c2920384a47fd0e074200e2ae4bc5820911351d41ccc72f5e2f1ac04d9934db38cfef334a970fceac97caf329a8c89fbbd6931a8a9a48e9
+EBUILD networkmanagement-0.9.0.11-r1.ebuild 1176 SHA256 c160a55c02d648c5ad6e431f242d25b2555b332a76eea3459b8d639bd9cd3088 SHA512 674fb7d69cb82737c1497713f0cc117225035a91c8961dc036a447386b9145277506096b5614b3418672a19c73a099cab4cb592b341cb0b454b81070ef4f3d27 WHIRLPOOL 3ffb479bc0b5905447fe28a30e0b038c35fcd5e9c086b4a2a1276b77007c1199c3212cb86d1bf0a270cd48edd936215b4ed96114616bcd447ac89e8bc926cdb7
EBUILD networkmanagement-0.9.0.11.ebuild 1124 SHA256 e8002c2542fe13c4e49888e088db50fb936f29efcd37f3290dcfc4d761af4c9b SHA512 e21479e573ee7fa651b5158d6c010493b3c558657111660a6590af39caa61d724c5dfbbc3a2ad72ceb369e75cef4ff5e6966ed5ff51a42c99181d53f847a8848 WHIRLPOOL daa90096f7e2d22e74e611982e24a6d4c456e2332f97f99096eb91bc85dfab19992921916474c3f238bcf9bea9cb9cdd57e0b5efe64a3fbba58c7b11cb930e43
-MISC ChangeLog 12509 SHA256 9e256a4dfc8f1ff37d3f17c5612eb651f8049a1253b8bf1d16bdf99ac848a401 SHA512 f50556826340713eb6147f294454d1eb31cd870d5a93dde01323372f0c50a69e9688641529c41d146188fa99d87662bfdfd278a5f4d2eb45ec94945f27c9c993 WHIRLPOOL a34e35450693a7209e262708702342d456bfdbe460ba151291eac48c30afd383f20d9a03ca5c16c4a2312ad13846dda3a2e573b5620af4ab6a63708cc0b1ac80
+MISC ChangeLog 12785 SHA256 23be8069f6aab0acc15769b60fbd4c9f2e2cce4aa2114d28b689068aa4d930bc SHA512 464873a3f867269dd9cd270788ec133a0d9ae8ff1c69ebe66ec3db5989cd751b0dad8ae74bb8cc7b25332674c7f8df8be188e79e8655bb9ccd58d45274f9166c WHIRLPOOL 82b60fce9ea9ec502375e9d25cc77669ae9517bc88d1bbf001d6a4a97c0fd93a3a70d7a0e87e2b81b1d4f81097dd9055e7cacf5ed1e3259bc871a9a17096e772
MISC metadata.xml 247 SHA256 8e2503a8926762a2b3dad3c19f026d695094dd326a40b0d015f248b553b3fe66 SHA512 1fb76e55794cfadf12b9992537cb1142329b9bc9c70693cbc515db9820c98e9cd34c1a1b9ca496dc55a22666b7eb477752d64f73a11505cbbf9290af291b6ce6 WHIRLPOOL 50b2f6805403d7abf7e9cc8bfef6663d898c630abe244dd35a3eb17c604d181560c607556ecc2c328530812939010505c2c5a12e5fc3953e835f27826f70d5df
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJT7PIkAAoJEGVpnaTzz9K9Ui0P/R2SQjUcWVUis4JKVJJU2RkT
-9zE7zFbjVSertjKwzDcR32u5vlUEcCd2F+jyeQWbS/LC8+sWSq0dTXFUKr1rPm33
-PfASgozBm7Zfw2zlPxrUj/gosPDBXpzOTLQBrT9holN/eBxsAhsyU1dmDophFrgi
-zY2kLBUQ7m5xg1If9JBDDR38vRlBpZxu4jdMgx+x/0lEyhY5vNuSt6/+5w+1fgR2
-/AilmzN6pQpp57mSI4XLsVpaMevB7v+6QqAfRB1oagtUPeSNPp4z2zFqgT+r2EyD
-8kxPlru/KgNnm8qNnfMGvC+njwV/MdDK6HGMeCXGNpmN1m85hkQo9lq9kEie4+mu
-TnyUcjFt0D562ztB8IvJMMcHwYxWFZv5rNH9gb8BVS1b6e6dp2RP9YJtfqun2a6d
-W4Pg5Y6WXho/XkGo3iKPA+JoW+05MnD7YvAfSuWo749hyhxxfI5+7ogSK2WKXDww
-POnC6Xyam9dMeOAeUU1TO3BXBRbA59fk7Wi12Kau/uKEips/hi6zia5vxSbQ4R+I
-6TVBFaCkXF2gZ2nPSDXlrMnvZgyR9HGNpalgkd8iqC74Qv8UStuR+oJb2DWXauEO
-zueB4elmMYP28ovvgK1rPtU8ZeP2hCxLk+TqEqBogTqzxPjyCEdN6j4RmLnbt3kh
-9mhpsRzMDxJaVSNxratZ
-=ns/h
+iQIcBAEBCAAGBQJUvtYDAAoJEGVpnaTzz9K9I8wQAMSSbnvloqK8JzKAV4kYnRHM
+G3YS5kICHt1sJ6m/EcwyKeSp1QhxvUUf2jbyAAkIOq8RIqECM6NwRQZfcUv0z/k7
+pNUFjjqse9GpA24i8y3+iNyDLizk6OZVm0piKKuyMHIQ9uKzWLGo5/nisDD6IQqI
+X/kPCBVkpVBVx/XUQis+XNXhE/y/EhUTFqaSy8F3cvWDH7e1HCQpF8ZMItXDIWLK
+BCfSdl1fN7I5MUafZwwBFdHx+hHPZ9wkKScEMNcJJhdgPxJA3oA1PKzL++FIRZ7q
+0AxxMxDXlq3IVmaj+5v8R24Dp9U68Cf8T+3zI4zoJFRSAxMgWqXSUkwSIViwGLwZ
+TXGhm07EI7pvLWN4PUvC6fl7HK92b0aHQUUaTwcDHptZQFUmVR01PfK9seB4ldmK
+9Re/JpnmVk68mk7AlA47pbsVfkLTwTt8PJ42ustzOyqyDa7NXR5FdVu3bbpUedy5
+RHvsoiT86f4gx6795YsSsiue0HlzP4LYdPhee30Nbe2/ckvyb7O5FAlWXIZMTxRb
+OPNsRNHmbbQfdVFsN1EXXL3yJ1visOykK+yDAXxnV359Bs3X0MVigl3KgomS2L5k
+ZDv7mb3AbPrjp974a4ZmS2+akVaLM+12NDdGwtmN4SJlbKYqXN+wMT/7umIYOZmF
+MOOGSj5H70wvIGSsetu7
+=b3kG
-----END PGP SIGNATURE-----
diff --git a/kde-misc/networkmanagement/files/networkmanagement-0.9.0.11-openconnect7.patch b/kde-misc/networkmanagement/files/networkmanagement-0.9.0.11-openconnect7.patch
new file mode 100644
index 000000000000..6de3bcac8d86
--- /dev/null
+++ b/kde-misc/networkmanagement/files/networkmanagement-0.9.0.11-openconnect7.patch
@@ -0,0 +1,367 @@
+From: Jan Grulich <jgrulich@redhat.com>
+Date: Thu, 11 Dec 2014 09:47:14 +0000
+Subject: Backport openconnect fixes from plasma-nm
+X-Git-Url: http://quickgit.kde.org/?p=networkmanagement.git&a=commitdiff&h=5e09186846e190427010a879ff25077db62a8ede
+---
+Backport openconnect fixes from plasma-nm
+Fixes OpenConnect NEWGROUP handling and build against OpenConnect > 7.0
+---
+
+
+--- a/vpnplugins/openconnect/CMakeLists.txt
++++ b/vpnplugins/openconnect/CMakeLists.txt
+@@ -18,6 +18,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ui)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../libs)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/internals)
++ include_directories(${OPENCONNECT_INCLUDE_DIRS})
+
+ set(openconnect_SRCS
+ openconnectui.cpp
+
+--- a/vpnplugins/openconnect/openconnectauth.cpp
++++ b/vpnplugins/openconnect/openconnectauth.cpp
+@@ -71,6 +71,7 @@
+ OpenconnectAuthWorkerThread *worker;
+ QList<VPNHost> hosts;
+ bool userQuit;
++ bool formGroupChanged;
+ int cancelPipes[2];
+ QList<QPair<QString, int> > serverLog;
+
+@@ -100,7 +101,7 @@
+ d->ui.btnConnect->setIcon(KIcon("network-connect"));
+ d->ui.viewServerLog->setChecked(false);
+
+- d->worker = new OpenconnectAuthWorkerThread(&d->mutex, &d->workerWaiting, &d->userQuit, d->cancelPipes[0]);
++ d->worker = new OpenconnectAuthWorkerThread(&d->mutex, &d->workerWaiting, &d->userQuit, &d->formGroupChanged, d->cancelPipes[0]);
+
+ // gets the pointer to struct openconnect_info (defined in openconnect.h), which contains data that OpenConnect needs,
+ // and which needs to be populated with settings we get from NM, like host, certificate or private key
+@@ -149,7 +150,7 @@
+ }
+ if (!dataMap[NM_OPENCONNECT_KEY_CACERT].isEmpty()) {
+ QByteArray crt = dataMap[NM_OPENCONNECT_KEY_CACERT].toAscii();
+- openconnect_set_cafile(d->vpninfo, strdup(crt.data()));
++ openconnect_set_cafile(d->vpninfo, OC3DUP(crt.data()));
+ }
+ if (dataMap[NM_OPENCONNECT_KEY_CSD_ENABLE] == "yes") {
+ char *wrapper;
+@@ -162,12 +163,12 @@
+ }
+ if (!dataMap[NM_OPENCONNECT_KEY_PROXY].isEmpty()) {
+ QByteArray proxy = dataMap[NM_OPENCONNECT_KEY_PROXY].toAscii();
+- openconnect_set_http_proxy(d->vpninfo, strdup(proxy.data()));
++ openconnect_set_http_proxy(d->vpninfo, OC3DUP(proxy.data()));
+ }
+ if (!dataMap[NM_OPENCONNECT_KEY_USERCERT].isEmpty()) {
+ QByteArray crt = dataMap[NM_OPENCONNECT_KEY_USERCERT].toAscii();
+ QByteArray key = dataMap[NM_OPENCONNECT_KEY_PRIVKEY].toAscii();
+- openconnect_set_client_cert (d->vpninfo, strdup(crt.data()), strdup(key.data()));
++ openconnect_set_client_cert (d->vpninfo, OC3DUP(crt.data()), OC3DUP(key.data()));
+
+ if (!crt.isEmpty() && dataMap[NM_OPENCONNECT_KEY_PEM_PASSPHRASE_FSID] == "yes") {
+ openconnect_passphrase_from_fsid(d->vpninfo);
+@@ -261,10 +262,10 @@
+ const VPNHost &host = d->hosts.at(i);
+ if (openconnect_parse_url(d->vpninfo, host.address.toAscii().data())) {
+ kWarning() << "Failed to parse server URL" << host.address;
+- openconnect_set_hostname(d->vpninfo, strdup(host.address.toAscii().data()));
++ openconnect_set_hostname(d->vpninfo, OC3DUP(host.address.toAscii().data()));
+ }
+ if (!openconnect_get_urlpath(d->vpninfo) && !host.group.isEmpty())
+- openconnect_set_urlpath(d->vpninfo, strdup(host.group.toAscii().data()));
++ openconnect_set_urlpath(d->vpninfo, OC3DUP(host.group.toAscii().data()));
+ d->secrets["lasthost"] = host.name;
+ addFormInfo(QLatin1String("dialog-information"), i18n("Contacting host, please wait..."));
+ d->worker->start();
+@@ -284,9 +285,13 @@
+ secretData.insert(QLatin1String(NM_OPENCONNECT_KEY_COOKIE), QLatin1String(openconnect_get_cookie(d->vpninfo)));
+ openconnect_clear_cookie(d->vpninfo);
+
++#if OPENCONNECT_CHECK_VER(5,0)
++ const char *fingerprint = openconnect_get_peer_cert_hash(d->vpninfo);
++#else
+ OPENCONNECT_X509 *cert = openconnect_get_peer_cert(d->vpninfo);
+ char fingerprint[41];
+ openconnect_get_cert_sha1(d->vpninfo, cert, fingerprint);
++#endif
+ secretData.insert(QLatin1String(NM_OPENCONNECT_KEY_GWCERT), QLatin1String(fingerprint));
+ secretData.insert(QLatin1String("certsigs"), d->certificateFingerprints.join("\t"));
+ secretData.insert(QLatin1String("autoconnect"), d->ui.chkAutoconnect->isChecked() ? "yes" : "no");
+@@ -434,14 +439,12 @@
+ cmb->setCurrentIndex(i);
+ if (sopt == AUTHGROUP_OPT(form) &&
+ i != AUTHGROUP_SELECTION(form)) {
+- // XXX: Immediately return OC_FORM_RESULT_NEWGROUP to
+- // change group
++ QTimer::singleShot(0, this, SLOT(formGroupChanged()));
+ }
+ }
+ }
+ if (sopt == AUTHGROUP_OPT(form)) {
+- // TODO: Hook up signal when the KComboBox entry changes, to
+- // return OC_FORM_RESULT_NEWGROUP
++ connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(formGroupChanged()));
+ }
+ widget = qobject_cast<QWidget*>(cmb);
+ }
+@@ -529,6 +532,15 @@
+ d->mutex.unlock();
+ }
+
++void OpenconnectAuthWidget::formGroupChanged()
++{
++ Q_D(OpenconnectAuthWidget);
++
++ d->formGroupChanged = true;
++ formLoginClicked();
++}
++
++
+ // Writes the user input from the form into the oc_auth_form structs we got from
+ // libopenconnect, and wakes the worker thread up to try to log in and obtain a
+ // cookie with this data
+@@ -548,14 +560,14 @@
+ if (opt->type == OC_FORM_OPT_PASSWORD || opt->type == OC_FORM_OPT_TEXT) {
+ KLineEdit *le = qobject_cast<KLineEdit*>(widget);
+ QByteArray text = le->text().toAscii();
+- opt->value = strdup(text.data());
++ openconnect_set_option_value(opt, text.data());
+ if (opt->type == OC_FORM_OPT_TEXT) {
+ d->secrets.insert(key,le->text());
+ }
+ } else if (opt->type == OC_FORM_OPT_SELECT) {
+ KComboBox *cbo = qobject_cast<KComboBox*>(widget);
+ QByteArray text = cbo->itemData(cbo->currentIndex()).toString().toAscii();
+- opt->value = strdup(text.data());
++ openconnect_set_option_value(opt, text.data());
+ d->secrets.insert(key,cbo->itemData(cbo->currentIndex()).toString());
+ }
+ }
+
+--- a/vpnplugins/openconnect/openconnectauth.h
++++ b/vpnplugins/openconnect/openconnectauth.h
+@@ -64,6 +64,7 @@
+ void updateLog(const QString &, const int &);
+ void logLevelChanged(int);
+ void formLoginClicked();
++ void formGroupChanged();
+ void workerFinished(const int&);
+ void viewServerLogToggled(bool);
+ void passwordModeToggled(bool);
+
+--- a/vpnplugins/openconnect/openconnectauthworkerthread.cpp
++++ b/vpnplugins/openconnect/openconnectauthworkerthread.cpp
+@@ -43,6 +43,20 @@
+ class OpenconnectAuthStaticWrapper
+ {
+ public:
++#if OPENCONNECT_CHECK_VER(5,0)
++ static int writeNewConfig(void *obj, const char *str, int num)
++ {
++ if (obj)
++ return static_cast<OpenconnectAuthWorkerThread*>(obj)->writeNewConfig(str, num);
++ return -1;
++ }
++ static int validatePeerCert(void *obj, const char *str)
++ {
++ if (obj)
++ return static_cast<OpenconnectAuthWorkerThread*>(obj)->validatePeerCert(NULL, str);
++ return -1;
++ }
++#else
+ static int writeNewConfig(void *obj, char *str, int num)
+ {
+ if (obj)
+@@ -55,7 +69,8 @@
+ return static_cast<OpenconnectAuthWorkerThread*>(obj)->validatePeerCert(cert, str);
+ return -1;
+ }
+- static int processAuthForm(void *obj, struct oc_auth_form *form)
++#endif
++ static int processAuthForm(void *obj, struct oc_auth_form *form)
+ {
+ if (obj)
+ return static_cast<OpenconnectAuthWorkerThread*>(obj)->processAuthFormP(form);
+@@ -72,15 +87,15 @@
+ }
+ };
+
+-OpenconnectAuthWorkerThread::OpenconnectAuthWorkerThread(QMutex *mutex, QWaitCondition *waitForUserInput, bool *userDecidedToQuit, int cancelFd)
+-: QThread(), m_mutex(mutex), m_waitForUserInput(waitForUserInput), m_userDecidedToQuit(userDecidedToQuit)
+-{
+- m_openconnectInfo = openconnect_vpninfo_new((char*)"OpenConnect VPN Agent (NetworkManager - running on KDE)",
+- OpenconnectAuthStaticWrapper::validatePeerCert,
+- OpenconnectAuthStaticWrapper::writeNewConfig,
+- OpenconnectAuthStaticWrapper::processAuthForm,
+- OpenconnectAuthStaticWrapper::writeProgress,
+- this);
++OpenconnectAuthWorkerThread::OpenconnectAuthWorkerThread(QMutex *mutex, QWaitCondition *waitForUserInput, bool *userDecidedToQuit, bool *formGroupChanged, int cancelFd)
++ : QThread(), m_mutex(mutex), m_waitForUserInput(waitForUserInput), m_userDecidedToQuit(userDecidedToQuit), m_formGroupChanged(formGroupChanged)
++{
++ m_openconnectInfo = openconnect_vpninfo_new((char*)"OpenConnect VPN Agent (PlasmaNM - running on KDE)",
++ OpenconnectAuthStaticWrapper::validatePeerCert,
++ OpenconnectAuthStaticWrapper::writeNewConfig,
++ OpenconnectAuthStaticWrapper::processAuthForm,
++ OpenconnectAuthStaticWrapper::writeProgress,
++ this);
+ #if OPENCONNECT_CHECK_VER(1,4)
+ openconnect_set_cancel_fd(m_openconnectInfo, cancelFd);
+ #else
+@@ -108,7 +123,7 @@
+ return m_openconnectInfo;
+ }
+
+-int OpenconnectAuthWorkerThread::writeNewConfig(char *buf, int buflen)
++int OpenconnectAuthWorkerThread::writeNewConfig(const char *buf, int buflen)
+ {
+ Q_UNUSED(buflen)
+ if (*m_userDecidedToQuit)
+@@ -116,32 +131,39 @@
+ emit writeNewConfig(QString(QByteArray(buf).toBase64()));
+ return 0;
+ }
++
+ #if !OPENCONNECT_CHECK_VER(1,5)
+ static char *openconnect_get_cert_details(struct openconnect_info *vpninfo,
+ OPENCONNECT_X509 *cert)
+ {
+- Q_UNUSED(vpninfo)
+-
+- BIO *bp = BIO_new(BIO_s_mem());
+- BUF_MEM *certinfo;
+- char zero = 0;
+- char *ret;
+-
+- X509_print_ex(bp, cert, 0, 0);
+- BIO_write(bp, &zero, 1);
+- BIO_get_mem_ptr(bp, &certinfo);
+-
+- ret = strdup(certinfo->data);
+- BIO_free(bp);
+-
+- return ret;
+-}
+-#endif
+-
+-int OpenconnectAuthWorkerThread::validatePeerCert(OPENCONNECT_X509 *cert, const char *reason)
+-{
+- if (*m_userDecidedToQuit)
+- return -EINVAL;
++ Q_UNUSED(vpninfo)
++
++ BIO *bp = BIO_new(BIO_s_mem());
++ BUF_MEM *certinfo;
++ char zero = 0;
++ char *ret;
++
++ X509_print_ex(bp, cert, 0, 0);
++ BIO_write(bp, &zero, 1);
++ BIO_get_mem_ptr(bp, &certinfo);
++
++ ret = strdup(certinfo->data);
++ BIO_free(bp);
++
++ return ret;
++}
++#endif
++
++int OpenconnectAuthWorkerThread::validatePeerCert(void *cert, const char *reason)
++{
++ if (*m_userDecidedToQuit)
++ return -EINVAL;
++
++#if OPENCONNECT_CHECK_VER(5,0)
++ (void)cert;
++ const char *fingerprint = openconnect_get_peer_cert_hash(m_openconnectInfo);
++ char *details = openconnect_get_peer_cert_details(m_openconnectInfo);
++#else
+ char fingerprint[41];
+ int ret = 0;
+
+@@ -150,7 +172,7 @@
+ return ret;
+
+ char *details = openconnect_get_cert_details(m_openconnectInfo, cert);
+-
++#endif
+ bool accepted = false;
+ m_mutex->lock();
+ QString qFingerprint(fingerprint);
+@@ -159,7 +181,7 @@
+ emit validatePeerCert(qFingerprint, qCertinfo, qReason, &accepted);
+ m_waitForUserInput->wait(m_mutex);
+ m_mutex->unlock();
+- ::free(details);
++ openconnect_free_cert_info(m_openconnectInfo, details);
+ if (*m_userDecidedToQuit)
+ return -EINVAL;
+
+@@ -176,14 +198,15 @@
+ return -1;
+
+ m_mutex->lock();
++ *m_formGroupChanged = false;
+ emit processAuthForm(form);
+ m_waitForUserInput->wait(m_mutex);
+ m_mutex->unlock();
+ if (*m_userDecidedToQuit)
+ return OC_FORM_RESULT_CANCELLED;
+
+- // TODO : If group changed, return OC_FORM_RESULT_NEWGROUP
+-
++ if (*m_formGroupChanged)
++ return OC_FORM_RESULT_NEWGROUP;
+ return OC_FORM_RESULT_OK;
+ }
+
+
+--- a/vpnplugins/openconnect/openconnectauthworkerthread.h
++++ b/vpnplugins/openconnect/openconnectauthworkerthread.h
+@@ -59,6 +59,18 @@
+ #define OC_FORM_RESULT_NEWGROUP 2
+ #endif
+
++#if OPENCONNECT_CHECK_VER(4,0)
++#define OC3DUP(x) (x)
++#else
++#define openconnect_set_option_value(opt, val) do { \
++ struct oc_form_opt *_o = (opt); \
++ free(_o->value); _o->value = strdup(val); \
++ } while (0)
++#define openconnect_free_cert_info(v, x) ::free(x)
++#define OC3DUP(x) strdup(x)
++#endif
++
++
+ #include <QThread>
+
+ class QMutex;
+@@ -70,7 +82,7 @@
+ Q_OBJECT
+ friend class OpenconnectAuthStaticWrapper;
+ public:
+- OpenconnectAuthWorkerThread(QMutex *, QWaitCondition *, bool *, int);
++ OpenconnectAuthWorkerThread(QMutex *, QWaitCondition *, bool *, bool *, int);
+ ~OpenconnectAuthWorkerThread();
+ struct openconnect_info* getOpenconnectInfo();
+
+@@ -85,14 +97,15 @@
+ void run();
+
+ private:
+- int writeNewConfig(char *, int);
+- int validatePeerCert(OPENCONNECT_X509 *, const char *);
++ int writeNewConfig(const char *, int);
++ int validatePeerCert(void *, const char *);
+ int processAuthFormP(struct oc_auth_form *);
+ void writeProgress(int level, const char *, va_list);
+
+ QMutex *m_mutex;
+ QWaitCondition *m_waitForUserInput;
+ bool *m_userDecidedToQuit;
++ bool *m_formGroupChanged;
+ struct openconnect_info *m_openconnectInfo;
+ };
+
diff --git a/kde-misc/networkmanagement/networkmanagement-0.9.0.11-r1.ebuild b/kde-misc/networkmanagement/networkmanagement-0.9.0.11-r1.ebuild
new file mode 100644
index 000000000000..3934dfd3bb5d
--- /dev/null
+++ b/kde-misc/networkmanagement/networkmanagement-0.9.0.11-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-misc/networkmanagement/networkmanagement-0.9.0.11-r1.ebuild,v 1.1 2015/01/20 22:26:06 johu Exp $
+
+EAPI=5
+
+KDE_LINGUAS="ar bs ca ca@valencia cs da de el es et fa fi fr ga gl hu ia it
+ja kk km ko lt mr nb nds nl nn pl pt pt_BR ro ru se sk sl sr sr@ijekavian
+sr@ijekavianlatin sr@Latn sv tr uk zh_CN zh_TW"
+KDE_SCM="git"
+KDE_MINIMAL="4.11"
+inherit kde4-base
+
+DESCRIPTION="KDE frontend for NetworkManager"
+HOMEPAGE="https://projects.kde.org/projects/extragear/base/networkmanagement"
+[[ ${PV} = 9999* ]] || SRC_URI="mirror://kde/unstable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS="~amd64 ~x86"
+SLOT="4"
+IUSE="debug openconnect"
+
+DEPEND="
+ net-misc/mobile-broadband-provider-info
+ >=net-misc/networkmanager-0.9.6
+ openconnect? (
+ net-misc/networkmanager-openconnect
+ net-misc/openconnect:=
+ )
+"
+RDEPEND="${DEPEND}
+ !kde-base/solid
+ !kde-misc/plasma-nm
+"
+
+PATCHES=( "${FILESDIR}/${P}-openconnect7.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with openconnect)
+ )
+ kde4-base_src_configure
+}