Skip to content

Commit

Permalink
Merge pull request #40 from mitch-roblox/feature/connection_opts
Browse files Browse the repository at this point in the history
Add key and verifyChain connection options
  • Loading branch information
martinisoft committed Nov 8, 2017
2 parents 604ee7f + 2aefd99 commit 993cec5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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 -%>

0 comments on commit 993cec5

Please sign in to comment.