Skip to content

Commit 323bf2d

Browse files
github-actions[bot]wfurtdanmoseley
authored
[release/6.0] update expected exception for cases when all requested TLS versions are disabled (#65046)
* update expected exception for cases when all requested TLS versions are disabled * port test fix Co-authored-by: wfurt <[email protected]> Co-authored-by: Dan Moseley <[email protected]>
1 parent 76a717c commit 323bf2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Collections.Generic;
5+
using System.ComponentModel;
56
using System.IO;
67
using System.Net.Security;
78
using System.Net.Test.Common;
@@ -294,9 +295,10 @@ await LoopbackServer.CreateServerAsync(async (server, url) =>
294295
{
295296
await serverTask;
296297
}
297-
catch (Exception e) when (e is IOException || e is AuthenticationException)
298+
catch (Exception e) when (e is IOException || e is AuthenticationException || e is Win32Exception)
298299
{
299300
// Some SSL implementations simply close or reset connection after protocol mismatch.
301+
// The call may fail if neither of the requested protocols is available
300302
// Newer OpenSSL sends Fatal Alert message before closing.
301303
return;
302304
}

0 commit comments

Comments
 (0)