diff --git a/public/js/pages/configBuilder.js b/public/js/pages/configBuilder.js
index 06b521e..07c69df 100644
--- a/public/js/pages/configBuilder.js
+++ b/public/js/pages/configBuilder.js
@@ -46,7 +46,7 @@ $(function () {
function setFileSelectVisibility() {
var selectedOption = $('#certificate option:selected');
- if (selectedOption.data('hasPrivateKey') == '1') {
+ if (selectedOption.data('hasPrivateKey') != '1') {
keyLocationContainer.show();
return;
}
diff --git a/src/Handler/Panel/ConfigBuilder/Action.php b/src/Handler/Panel/ConfigBuilder/Action.php
index 2636cdf..7bbb724 100644
--- a/src/Handler/Panel/ConfigBuilder/Action.php
+++ b/src/Handler/Panel/ConfigBuilder/Action.php
@@ -76,6 +76,7 @@ class Action extends Session
$parameters = [
'server' => $server,
+ 'ca' => file_get_contents($this->getCore()->getBaseDir() . '/storage/ca/ca.crt'),
'cert' => $cert->getCertificate(),
'key' => '',
];
diff --git a/views/etc/openvpn-client-embedded.conf.twig b/views/etc/openvpn-client-embedded.conf.twig
index b90deb5..1226176 100644
--- a/views/etc/openvpn-client-embedded.conf.twig
+++ b/views/etc/openvpn-client-embedded.conf.twig
@@ -22,13 +22,10 @@ cipher AES-256-CBC
comp-lzo
-{{ ca }}
-
+{{ ca }}
-{{ cert }}
-
+{{ cert }}
-{{ key }}
-
\ No newline at end of file
+{{ key }}
\ No newline at end of file