Mohammed Al Sahaf
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
modules/caddytls/connpolicy.go
|
|
@ -222,15 +222,15 @@ func (p *ConnectionPolicy) buildStandardTLSConfig(ctx caddy.Context) error { |
|
|
|
} |
|
|
|
|
|
|
|
// min and max protocol versions
|
|
|
|
if (p.ProtocolMin != "" && p.ProtocolMax != "") && p.ProtocolMin > p.ProtocolMax { |
|
|
|
return fmt.Errorf("protocol min (%x) cannot be greater than protocol max (%x)", p.ProtocolMin, p.ProtocolMax) |
|
|
|
} |
|
|
|
if p.ProtocolMin != "" { |
|
|
|
cfg.MinVersion = SupportedProtocols[p.ProtocolMin] |
|
|
|
} |
|
|
|
if p.ProtocolMax != "" { |
|
|
|
cfg.MaxVersion = SupportedProtocols[p.ProtocolMax] |
|
|
|
} |
|
|
|
if p.ProtocolMin > p.ProtocolMax { |
|
|
|
return fmt.Errorf("protocol min (%x) cannot be greater than protocol max (%x)", p.ProtocolMin, p.ProtocolMax) |
|
|
|
} |
|
|
|
|
|
|
|
// client authentication
|
|
|
|
if p.ClientAuthentication != nil { |
|
|
|