mirror of
https://github.com/alibaba/higress.git
synced 2026-06-26 02:35:02 +08:00
fix tls version annotation (#1652)
This commit is contained in:
@@ -15,8 +15,8 @@
|
|||||||
package annotations
|
package annotations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
networking "istio.io/api/networking/v1alpha3"
|
networking "istio.io/api/networking/v1alpha3"
|
||||||
gatewaytool "istio.io/istio/pkg/config/gateway"
|
gatewaytool "istio.io/istio/pkg/config/gateway"
|
||||||
@@ -157,8 +157,7 @@ func convertTLSVersion(version string) (networking.ServerTLSSettings_TLSProtocol
|
|||||||
case "TLSv1.2":
|
case "TLSv1.2":
|
||||||
return networking.ServerTLSSettings_TLSV1_2, nil
|
return networking.ServerTLSSettings_TLSV1_2, nil
|
||||||
case "TLSv1.3":
|
case "TLSv1.3":
|
||||||
default:
|
return networking.ServerTLSSettings_TLSV1_3, nil
|
||||||
|
}
|
||||||
return networking.ServerTLSSettings_TLS_AUTO, fmt.Errorf("invalid TLS version: %s. Valid values are: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3", version)
|
return networking.ServerTLSSettings_TLS_AUTO, fmt.Errorf("invalid TLS version: %s. Valid values are: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3", version)
|
||||||
}
|
}
|
||||||
return networking.ServerTLSSettings_TLS_AUTO, fmt.Errorf("unreachable code, but required by compiler")
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user