diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-03-11 23:51:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-11 23:51:44 +0300 |
commit | 323bf2dd0ef1004687a8bafa10a0c66f63252dee (patch) | |
tree | 0058d75ca7431cf7b76ca58be04503bd996539db | |
parent | 76a717c175de2d3308f6f9928a5ddea35b21d9cb (diff) |
[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 <tweinfurt@yahoo.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
-rw-r--r-- | src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs index 5a643c09aec..d6ecb3bca3a 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.ComponentModel; using System.IO; using System.Net.Security; using System.Net.Test.Common; @@ -294,9 +295,10 @@ namespace System.Net.Http.Functional.Tests { await serverTask; } - catch (Exception e) when (e is IOException || e is AuthenticationException) + catch (Exception e) when (e is IOException || e is AuthenticationException || e is Win32Exception) { // Some SSL implementations simply close or reset connection after protocol mismatch. + // The call may fail if neither of the requested protocols is available // Newer OpenSSL sends Fatal Alert message before closing. return; } |