Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add key and verifyChain connection options #40

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions resources/connection.rb
Expand Up @@ -24,7 +24,9 @@
property :accept, required: true
property :cafile, String
property :cert, String
property :key, String
property :verify, Integer
property :verify_chain, [true, false]
property :timeout_close, [true, false]
property :client, [true, false]

Expand All @@ -34,7 +36,9 @@
accept: new_resource.accept,
cafile: new_resource.cafile,
cert: new_resource.cert,
key: new_resource.key,
verify: new_resource.verify,
verify_chain: new_resource.verify_chain,
timeout_close: new_resource.timeout_close,
client: new_resource.client
)
Expand Down
5 changes: 4 additions & 1 deletion templates/default/stunnel.conf.erb
Expand Up @@ -85,7 +85,7 @@ TIMEOUTclose = 0

<% node['stunnel']['services'].each do |name, opts| -%>
[<%= name %>]
<% %w[connect accept cert verify].each do |opt| -%>
<% %w[connect accept key cert verify].each do |opt| -%>
<% unless opts[opt].nil? -%>
<%= opt %> = <%= opts[opt] %>
<% end -%>
Expand All @@ -99,4 +99,7 @@ TIMEOUTclose = <%= opts['timeout_close'] ? 1 : 0 %>
<% unless opts['client'].nil? -%>
client = <%= opts['client'] ? "yes" : "no" %>
<% end -%>
<% unless opts['verify_chain'].nil? -%>
verifyChain = <%= opts['verify_chain'] ? 'yes' : 'no' %>
<% end -%>
<% end -%>