mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
plugin/tls: make CA parameter optional (#1800)
This commit is contained in:
committed by
John Belamaric
parent
8026dc2560
commit
bffb955f69
@@ -24,10 +24,10 @@ func setup(c *caddy.Controller) error {
|
||||
|
||||
for c.Next() {
|
||||
args := c.RemainingArgs()
|
||||
if len(args) != 3 {
|
||||
if len(args) < 2 || len(args) > 3 {
|
||||
return plugin.Error("tls", c.ArgErr())
|
||||
}
|
||||
tls, err := tls.NewTLSConfig(args[0], args[1], args[2])
|
||||
tls, err := tls.NewTLSConfigFromArgs(args...)
|
||||
if err != nil {
|
||||
return plugin.Error("tls", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user