This patch brings feature parity with gnome's nm-connection-editor strongswan plugin. Enabling custom proposals is required in order to support connections to strict strong cipher endpoints, the default cipher list doesn't include eg: aes256gcm16-prfsha384-ecp384.
--- plasma-nm-5.15.5/vpn/strongswan/strongswanprop.ui	2019-05-07 03:09:13.000000000 -0700
+++ plasma-nm-5.15.5/vpn/strongswan/strongswanprop.ui	2019-08-30 17:56:38.294499999 -0700
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>490</width>
-    <height>460</height>
+    <width>518</width>
+    <height>581</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -285,6 +285,54 @@
         </property>
        </widget>
       </item>
+      <item>
+       <widget class="QGroupBox" name="groupBox_4">
+        <property name="title">
+         <string>Cipher proposals</string>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout_3">
+         <item>
+          <widget class="QCheckBox" name="proposal">
+           <property name="text">
+            <string>Enable custom proposals</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <layout class="QFormLayout" name="formLayout_6">
+           <item row="0" column="0">
+            <widget class="QLabel" name="label_3">
+             <property name="text">
+              <string>IKE:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1">
+            <widget class="QLineEdit" name="ike">
+             <property name="toolTip">
+              <string>A list of proposals for IKE separated by &quot;;&quot;</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0">
+            <widget class="QLabel" name="label_3">
+             <property name="text">
+              <string>ESP:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1">
+            <widget class="QLineEdit" name="esp">
+             <property name="toolTip">
+              <string>A list of proposals for ESP separated by &quot;;&quot;</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
@@ -349,5 +397,37 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>proposal</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>ike</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>258</x>
+     <y>466</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>276</x>
+     <y>499</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>proposal</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>esp</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>258</x>
+     <y>466</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>276</x>
+     <y>536</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>
--- plasma-nm-5.15.5/vpn/strongswan/nm-strongswan-service.h	2019-05-07 03:09:13.000000000 -0700
+++ plasma-nm-5.15.5/vpn/strongswan/nm-strongswan-service.h	2019-08-30 17:11:33.031930029 -0700
@@ -37,6 +37,9 @@
 #define NM_STRONGSWAN_INNERIP "virtual"
 #define NM_STRONGSWAN_ENCAP "encap"
 #define NM_STRONGSWAN_IPCOMP "ipcomp"
+#define NM_STRONGSWAN_PROPOSAL "proposal"
+#define NM_STRONGSWAN_IKE "ike"
+#define NM_STRONGSWAN_ESP "esp"
 
 #define NM_STRONGSWAN_AUTH_KEY "key"
 #define NM_STRONGSWAN_AUTH_AGENT "agent"
--- plasma-nm-5.15.5/vpn/strongswan/strongswanwidget.cpp	2019-05-07 03:09:13.000000000 -0700
+++ plasma-nm-5.15.5/vpn/strongswan/strongswanwidget.cpp	2019-08-30 17:59:18.597399137 -0700
@@ -97,6 +97,9 @@
     d->ui.innerIP->setChecked(dataMap[NM_STRONGSWAN_INNERIP] == "yes");
     d->ui.udpEncap->setChecked(dataMap[NM_STRONGSWAN_ENCAP] == "yes");
     d->ui.ipComp->setChecked(dataMap[NM_STRONGSWAN_IPCOMP] == "yes");
+    d->ui.proposal->setChecked(dataMap[NM_STRONGSWAN_PROPOSAL] == "yes");
+    d->ui.ike->setText(dataMap[NM_STRONGSWAN_IKE]);
+    d->ui.esp->setText(dataMap[NM_STRONGSWAN_ESP]);
 }
 
 void StrongswanSettingWidget::loadSecrets(const NetworkManager::Setting::Ptr &setting)
@@ -148,6 +151,9 @@
     data.insert(NM_STRONGSWAN_INNERIP, d->ui.innerIP->isChecked() ? "yes" : "no");
     data.insert(NM_STRONGSWAN_ENCAP, d->ui.udpEncap->isChecked() ? "yes" : "no");
     data.insert(NM_STRONGSWAN_IPCOMP, d->ui.ipComp->isChecked() ? "yes" : "no");
+    data.insert(NM_STRONGSWAN_PROPOSAL, d->ui.proposal->isChecked() ? "yes" : "no");
+    data.insert(NM_STRONGSWAN_IKE, d->ui.ike->text());
+    data.insert(NM_STRONGSWAN_ESP, d->ui.esp->text());
 
     // save it all
     setting.setData(data);

Reply via email to