diff --git a/.travis.yml b/.travis.yml index 3a846bb..3e9ae9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,8 +28,5 @@ matrix: - rvm: 2.1.5 bundler_args: --without system_tests env: PUPPET_GEM_VERSION="~> 3.0" - - rvm: 1.9.3 - bundler_args: --without system_tests - env: PUPPET_GEM_VERSION="~> 3.0" notifications: email: false diff --git a/manifests/tun.pp b/manifests/tun.pp index 109f9ca..e3b8d93 100644 --- a/manifests/tun.pp +++ b/manifests/tun.pp @@ -33,10 +33,13 @@ # [*verify*] # Verify peer certificate. Default is 2 for backwards compatibility with # this Puppet module. -# Other values: 1 - verify peer certificate if present +# Other values: 0 - request and ignore peer certificate. +# 1 - verify peer certificate if present # 2 - verify peer certificate # 3 - verify peer with locally installed certificate +# 4 - ignore CA chain and only verify peer certificate # default - no verify +# Note that this module has only been tested using verify mode 2 and default. # See below for examples. # # [*ssl_version*] diff --git a/spec/defines/tun_spec.rb b/spec/defines/tun_spec.rb index b64a84b..0281ec3 100644 --- a/spec/defines/tun_spec.rb +++ b/spec/defines/tun_spec.rb @@ -17,7 +17,7 @@ end it { is_expected.to contain_file('/etc/stunnel/rsyncd.conf') - .with_content(/verify = default/) + .without_content(/verify/) } end diff --git a/templates/stunnel.conf.erb b/templates/stunnel.conf.erb index 173046e..e106c71 100644 --- a/templates/stunnel.conf.erb +++ b/templates/stunnel.conf.erb @@ -1,8 +1,6 @@ ; This stunnel config is managed by Puppet. -<% if @verify == 'default' -%> -verify = default -<% else -%> +<% unless @verify == 'default' -%> cert = <%= @certificate %> key = <%= @private_key %> CAfile = <%= @ca_file %>