Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Net.Security.Tests SslStream_UntrustedCaWithCustomCallback tests failing #46865

Closed
mdh1418 opened this issue Jan 12, 2021 · 2 comments
Closed

Comments

@mdh1418
Copy link
Member

mdh1418 commented Jan 12, 2021

In #46814, Send to Helix fails in Libraries Tests Run release coreclr OSX x64 Debug

System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_Throws(customCallback: True) [FAIL]
      Assert.Contains() Failure
      Not found: RemoteCertificateValidationCallback
      In value:  Authentication failed, see inner exception.
      Stack Trace:
        /_/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs(321,0): at System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_Throws(Boolean customCallback)

System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_Throws(customCallback: False) [FAIL]
      Assert.Contains() Failure
      Not found: PartialChain
      In value:  Authentication failed, see inner exception.
      Stack Trace:
        /_/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs(321,0): at System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_Throws(Boolean customCallback)

System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_OK(usePartialChain: True) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (Authentication failed, see inner exception.)) (One or more errors occurred. (Authentication failed, see inner exception.))
      ---- System.AggregateException : One or more errors occurred. (Authentication failed, see inner exception.)
      -------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
      ------------ Interop+AppleCrypto+SslException : bad protocol version
      ---- System.AggregateException : One or more errors occurred. (Authentication failed, see inner exception.)
      -------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
      ------------ Interop+AppleCrypto+SslException : One or more parameters passed to a function were not valid.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(122,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(84,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        /_/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs(274,0): at System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_OK(Boolean usePartialChain)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(393,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(393,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(96,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs(273,0): at Interop.AppleCrypto.SslSetCertificate(SafeSslHandle sslHandle, IntPtr[] certChainPtrs)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(345,0): at System.Net.SafeDeleteSslContext.SetCertificate(SafeSslHandle sslContext, SslStreamCertificateContext context)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(123,0): at System.Net.SafeDeleteSslContext.CreateSslContext(SafeFreeSslCredentials credential, Boolean isServer)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(40,0): at System.Net.SafeDeleteSslContext..ctor(SafeFreeSslCredentials credential, SslAuthenticationOptions sslAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.OSX.cs(236,0): at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)

System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_OK(usePartialChain: False) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (Authentication failed, see inner exception.)) (One or more errors occurred. (Authentication failed, see inner exception.))
      ---- System.AggregateException : One or more errors occurred. (Authentication failed, see inner exception.)
      -------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
      ------------ Interop+AppleCrypto+SslException : bad protocol version
      ---- System.AggregateException : One or more errors occurred. (Authentication failed, see inner exception.)
      -------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
      ------------ Interop+AppleCrypto+SslException : One or more parameters passed to a function were not valid.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(122,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(84,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        /_/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs(274,0): at System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_OK(Boolean usePartialChain)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(393,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(393,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(96,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs(273,0): at Interop.AppleCrypto.SslSetCertificate(SafeSslHandle sslHandle, IntPtr[] certChainPtrs)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(345,0): at System.Net.SafeDeleteSslContext.SetCertificate(SafeSslHandle sslContext, SslStreamCertificateContext context)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(123,0): at System.Net.SafeDeleteSslContext.CreateSslContext(SafeFreeSslCredentials credential, Boolean isServer)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(40,0): at System.Net.SafeDeleteSslContext..ctor(SafeFreeSslCredentials credential, SslAuthenticationOptions sslAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.OSX.cs(236,0): at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)

System_Net_Securit_fail.txt

@ghost
Copy link

ghost commented Jan 12, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

In #46814, Send to Helix fails in Libraries Tests Run release coreclr OSX x64 Debug

System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_Throws(customCallback: True) [FAIL]
      Assert.Contains() Failure
      Not found: RemoteCertificateValidationCallback
      In value:  Authentication failed, see inner exception.
      Stack Trace:
        /_/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs(321,0): at System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_Throws(Boolean customCallback)

System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_Throws(customCallback: False) [FAIL]
      Assert.Contains() Failure
      Not found: PartialChain
      In value:  Authentication failed, see inner exception.
      Stack Trace:
        /_/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs(321,0): at System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_Throws(Boolean customCallback)

System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_OK(usePartialChain: True) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (Authentication failed, see inner exception.)) (One or more errors occurred. (Authentication failed, see inner exception.))
      ---- System.AggregateException : One or more errors occurred. (Authentication failed, see inner exception.)
      -------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
      ------------ Interop+AppleCrypto+SslException : bad protocol version
      ---- System.AggregateException : One or more errors occurred. (Authentication failed, see inner exception.)
      -------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
      ------------ Interop+AppleCrypto+SslException : One or more parameters passed to a function were not valid.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(122,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(84,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        /_/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs(274,0): at System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_OK(Boolean usePartialChain)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(393,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(393,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(96,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs(273,0): at Interop.AppleCrypto.SslSetCertificate(SafeSslHandle sslHandle, IntPtr[] certChainPtrs)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(345,0): at System.Net.SafeDeleteSslContext.SetCertificate(SafeSslHandle sslContext, SslStreamCertificateContext context)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(123,0): at System.Net.SafeDeleteSslContext.CreateSslContext(SafeFreeSslCredentials credential, Boolean isServer)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(40,0): at System.Net.SafeDeleteSslContext..ctor(SafeFreeSslCredentials credential, SslAuthenticationOptions sslAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.OSX.cs(236,0): at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)

System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_OK(usePartialChain: False) [FAIL]
      System.AggregateException : One or more errors occurred. (One or more errors occurred. (Authentication failed, see inner exception.)) (One or more errors occurred. (Authentication failed, see inner exception.))
      ---- System.AggregateException : One or more errors occurred. (Authentication failed, see inner exception.)
      -------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
      ------------ Interop+AppleCrypto+SslException : bad protocol version
      ---- System.AggregateException : One or more errors occurred. (Authentication failed, see inner exception.)
      -------- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
      ------------ Interop+AppleCrypto+SslException : One or more parameters passed to a function were not valid.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(122,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(84,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        /_/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNetworkStreamTest.cs(274,0): at System.Net.Security.Tests.SslStreamNetworkStreamTest.SslStream_UntrustedCaWithCustomCallback_OK(Boolean usePartialChain)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(393,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
        ----- Inner Stack Trace -----
        
        ----- Inner Stack Trace #2 (System.AggregateException) -----
        
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs(393,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(96,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        ----- Inner Stack Trace -----
        /_/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs(273,0): at Interop.AppleCrypto.SslSetCertificate(SafeSslHandle sslHandle, IntPtr[] certChainPtrs)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(345,0): at System.Net.SafeDeleteSslContext.SetCertificate(SafeSslHandle sslContext, SslStreamCertificateContext context)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(123,0): at System.Net.SafeDeleteSslContext.CreateSslContext(SafeFreeSslCredentials credential, Boolean isServer)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs(40,0): at System.Net.SafeDeleteSslContext..ctor(SafeFreeSslCredentials credential, SslAuthenticationOptions sslAuthenticationOptions)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.OSX.cs(236,0): at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)

System_Net_Securit_fail.txt

Author: mdh1418
Assignees: -
Labels:

area-System.Net.Security

Milestone: -

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Jan 12, 2021
@wfurt
Copy link
Member

wfurt commented Jan 12, 2021

Duplicate of #46837

@wfurt wfurt closed this as completed Jan 12, 2021
@wfurt wfurt marked this as a duplicate of #46837 Jan 13, 2021
@karelz karelz added this to the 6.0.0 milestone Jan 26, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 25, 2021
@karelz karelz removed the untriaged New issue has not been triaged by the area owner label Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants