mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/stunnel: style and sync
This commit is contained in:
@@ -84,6 +84,7 @@ security/intrusion-detection-content-snort-vrt -- IDS Snort VRT ruleset (needs r
|
||||
security/maltrail -- Malicious traffic detection system
|
||||
security/openconnect -- OpenConnect Client
|
||||
security/softether -- Cross-platform Multi-protocol VPN Program (development only)
|
||||
security/stunnel -- stunnel TLS proxy (development only)
|
||||
security/tinc -- Tinc VPN
|
||||
security/tor -- The Onion Router
|
||||
sysutils/api-backup -- Provide the functionality to download the config.xml
|
||||
|
||||
@@ -2,7 +2,7 @@ PLUGIN_NAME= stunnel
|
||||
PLUGIN_VERSION= 0.1
|
||||
PLUGIN_COMMENT= stunnel TLS proxy
|
||||
PLUGIN_MAINTAINER= ad@opnsense.org
|
||||
PLUGIN_DEPENDS= stunnel
|
||||
PLUGIN_DEPENDS= stunnel
|
||||
PLUGIN_DEVEL= yes
|
||||
|
||||
.include "../../Mk/plugins.mk"
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
function stunnel_configure()
|
||||
{
|
||||
return array(
|
||||
return array(
|
||||
'crl' => array('stunnel_refresh_crls')
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
function stunnel_refresh_crls()
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
|
||||
namespace OPNsense\Stunnel\Api;
|
||||
|
||||
use \OPNsense\Base\ApiMutableModelControllerBase;
|
||||
use OPNsense\Base\ApiMutableModelControllerBase;
|
||||
|
||||
class ServicesController extends ApiMutableModelControllerBase
|
||||
{
|
||||
|
||||
+1
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
namespace OPNsense\Stunnel;
|
||||
|
||||
use OPNsense\Base\{IndexController};
|
||||
|
||||
class ServicesController extends IndexController
|
||||
|
||||
@@ -52,7 +52,7 @@ foreach ($stunnel->services->service->__items as $service) {
|
||||
foreach (explode(",", (string)$service->cacert) as $caid) {
|
||||
foreach ($configObj->ca as $ca) {
|
||||
if ((string)$ca->refid == $caid) {
|
||||
$all_certs["{$base_path}/{$this_uuid}.ca"] .= base64_decode((string)$ca->crt)."\n";
|
||||
$all_certs["{$base_path}/{$this_uuid}.ca"] .= base64_decode((string)$ca->crt) . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ foreach (glob("{$base_path}/*") as $filename) {
|
||||
}
|
||||
}
|
||||
|
||||
foreach($all_certs as $filename => $content) {
|
||||
foreach ($all_certs as $filename => $content) {
|
||||
file_put_contents($filename, $content);
|
||||
chown($filename, "stunnel");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user