Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Fix support for no verify #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion manifests/tun.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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*]
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/tun_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
end
it {
is_expected.to contain_file('/etc/stunnel/rsyncd.conf')
.with_content(/verify = default/)
.without_content(/verify/)
}
end

Expand Down
4 changes: 1 addition & 3 deletions templates/stunnel.conf.erb
Original file line number Diff line number Diff line change
@@ -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 %>
Expand Down