summaryrefslogtreecommitdiff
path: root/templates/client.conf.erb
blob: 38fe6ef98fa35f7e895151764a4b4a322d59e22a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
; templated stunnel configuration file to be used by puppet stunnel module
; NOTE: any changes you make to this file will be overwritten the next time 
; puppet runs, please make configuration changes to this service in puppet

; Global configuration options
<%= 'pid = ' + real_pid %>
<%- %w{chroot setuid setgid service compression}.each do |v|
    if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + " = " + instance_variable_get("@#{v}").to_s %>
<%-
	end
end -%>

; Some performance tunings
<% if socket.is_a? String -%>
<%= 'socket = ' + socket %>
<% elsif socket.is_a? Array -%>
<%= socket.map { |i| "socket = #{i}" }. join("\n") %>
<% end -%>

<%- %w{debug output syslog}.each do |v|
    if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + " = " + instance_variable_get("@#{v}").to_s %>
<%-
	end
end -%>

<%= 'EGD = ' + EGD if EGD %>
<%= 'engine = ' + engine if engine %>
<%= 'engineCtrl = ' + engineCtrl if engineCtrl %>

<%= 'RNDbytes = ' + RNDbytes if RNDbytes %>
<%= 'RNDfile = ' + RNDfile if RNDfile %>
<%= 'RNDoverwrite = ' + RNDoverwrite if RNDoverwrite %>

<%- %w{EGD engine engineCtrl RNDbytes RNDfile RNDoverwrite}.each do |v|
    if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + " = " + instance_variable_get("@#{v}").to_s %>
<%-
	end
end -%>

; Service-level configuration
<%= '[' + name + ']' %>
<%- %w{accept CApath CAfile cert ciphers connect CRLpath CRLfile delay engineNum exec 
       execargs failover ident key local OSCP OCSPflag options protocol protocolAuthentication
       protocolHost protocolPassword protocolUsername pty retry session sslVersion stack 
       TIMEOUTbusy TIMEOUTclose TIMEOUTconnect TIMEOUTidle transparent verify}.each do |v|
    if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
    end
end -%>
<%= 'client = ' + client ? 'yes' : 'no' %>