File tree 3 files changed +17
-2
lines changed
3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,18 @@ func main() {
126
126
}
127
127
128
128
func tlsbind () net.Listener {
129
+ certPath := v .GetString ("tlsdir" ) + "/cert.pem"
130
+ keyPath := v .GetString ("tlsdir" ) + "/key.pem"
129
131
130
- kpr , err := NewKeypairReloader (v .GetString ("tlsdir" )+ "/cert.pem" , v .GetString ("tlsdir" )+ "/key.pem" )
132
+ if v .GetString ("tlscert" ) != "" {
133
+ certPath = v .GetString ("tlscert" )
134
+ }
135
+
136
+ if v .GetString ("tlskey" ) != "" {
137
+ keyPath = v .GetString ("tlskey" )
138
+ }
139
+
140
+ kpr , err := NewKeypairReloader (certPath , keyPath )
131
141
if err != nil {
132
142
logger .Errorf ("could not load TLS, incorrect directory? Error: %s" , err )
133
143
os .Exit (1 )
Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ gops = false
18
18
19
19
#directory to look for key.pem and cert.pem. (default ".")
20
20
#
21
- #TLSDir = "/etc/pki/tls/matermost/"
21
+ #TLSDir = "/etc/pki/tls/matterircd/"
22
+
23
+ # Specify the full path for your key and cert
24
+ #TLSKey = "/etc/pki/tls/matterircd/key.pem"
25
+ #TLSCert = "/etc/pki/tls/matterircd/cer.pem"
22
26
23
27
#PasteBufferTimeout specifies the amount of time in milliseconds that
24
28
#messages get kept in matterircd internal buffer before being sent to
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ type keypairReloader struct {
16
16
keyPath string
17
17
}
18
18
19
+ // nolint:golint
19
20
func NewKeypairReloader (certPath , keyPath string ) (* keypairReloader , error ) {
20
21
result := & keypairReloader {
21
22
certPath : certPath ,
You can’t perform that action at this time.
0 commit comments