From bd1cff68d40f9214195d0fc4a3136f5fb630a470 Mon Sep 17 00:00:00 2001 From: Benedikt Trefzer Date: Fri, 25 Nov 2016 22:02:04 +0100 Subject: [PATCH] allow empty certificate/key if client=true, the certificate and the private key is not needed. --- templates/stunnel.conf.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/stunnel.conf.erb b/templates/stunnel.conf.erb index 18ea32d..d45d9a1 100644 --- a/templates/stunnel.conf.erb +++ b/templates/stunnel.conf.erb @@ -1,7 +1,11 @@ ; This stunnel config is managed by Puppet. +<% if @certificate != '' -%> cert = <%= @certificate %> +<% end -%> +<% if @private_key != '' -%> key = <%= @private_key %> +<% end -%> CAfile = <%= @ca_file %> CRLfile = <%= @crl_file %> sslVersion = <%= @ssl_version_real %>