Linked key and ca file configuration to vpn execution. Added option to
[openvpnui.git] / qml / pages / ConfigurePage.qml
index 1615c97..d00f37f 100644 (file)
@@ -140,7 +140,8 @@ Dialog {
             ValueButtonAlignRight {
                 id: caCertFilename
                 label: "CA cert"
-                value: "Select"
+                value: VpnControl.caCertFile
+                placeholderText: "Select"
                 width: parent.width
                 onClicked: {
                     _fileDialogue = 1
@@ -150,7 +151,7 @@ Dialog {
 
             ValueButtonAlignRight {
                 id: clientCertFilename
-                value: "Select"
+                value: ((VpnControl.clientCertFile === "") ? "Select" : VpnControl.clientCertFile)
                 label: "Client cert"
                 width: parent.width
                 onClicked: {
@@ -161,7 +162,7 @@ Dialog {
 
             ValueButtonAlignRight {
                 id: clientKeyFilename
-                value: "Select"
+                value: ((VpnControl.clientKeyFile === "") ? "Select" : VpnControl.clientKeyFile)
                 label: "Client key"
                 width: parent.width
                 onClicked: {
@@ -172,7 +173,7 @@ Dialog {
 
             ValueButtonAlignRight {
                 id: tlsKeyFilename
-                value: "Select"
+                value: ((VpnControl.tlsKeyFile === "") ? "Select" : VpnControl.tlsKeyFile)
                 label: "TLS key"
                 width: parent.width
                 enabled: configureTLS.checked
@@ -191,11 +192,9 @@ Dialog {
         VpnControl.setUseTLS(configureTLS.checked)
         VpnControl.setTlsDirection(configureTLSdirection.currentIndex)
         VpnControl.updateConfiguration()
+        VpnControl.setCaCertFile(caCertFilename.value)
+        VpnControl.setClientCertFile(clientCertFilename.value)
+        VpnControl.setClientKeyFile(clientKeyFilename.value)
+        VpnControl.setTlsKeyFile(tlsKeyFilename.value)
     }
-
 }
-
-
-
-
-