Skip to content

Commit c5d2d81

Browse files
committed
support "any" option
1 parent 1f19cc3 commit c5d2d81

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/BenchmarksApps/TLS/Kestrel/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ static IPEndPoint CreateIPEndPoint(UrlPrefix urlPrefix)
197197
static SslProtocols? ParseSslProtocols(string? supportedTlsVersions)
198198
{
199199
var protocols = SslProtocols.None;
200-
if (string.IsNullOrEmpty(supportedTlsVersions))
200+
if (string.IsNullOrEmpty(supportedTlsVersions) || supportedTlsVersions == "any")
201201
{
202-
return protocols;
202+
return null;
203203
}
204204

205205
foreach (var version in supportedTlsVersions.Split(','))
@@ -217,8 +217,6 @@ static IPEndPoint CreateIPEndPoint(UrlPrefix urlPrefix)
217217
case "tls13":
218218
protocols |= SslProtocols.Tls13;
219219
break;
220-
case "any":
221-
return null;
222220
default:
223221
throw new ArgumentException($"Unsupported TLS version: {version}");
224222
}

0 commit comments

Comments
 (0)