Skip to content

Web cmdlet tests fail in Linux CI due to OpenSSL configuration #13670

@rjmholt

Description

@rjmholt

From #13643.

An example of the failure:

2020-09-18T22:42:29.2955211Z       [-] Verifies Invoke-WebRequest -SslProtocol Tls works on Tls 101ms
2020-09-18T22:42:29.2955800Z         OpenSslCryptographicException: error:141A90B5:SSL routines:ssl_cipher_list_to_bytes:no ciphers available
2020-09-18T22:42:29.2956608Z         SslException: SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL.
2020-09-18T22:42:29.2957106Z         AuthenticationException: Authentication failed, see inner exception.
2020-09-18T22:42:29.2957636Z         HttpRequestException: The SSL connection could not be established, see inner exception.
2020-09-18T22:42:29.2958223Z         at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 1746
2020-09-18T22:42:29.2958957Z VERBOSE:    at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
2020-09-18T22:42:29.2959667Z    at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.2960329Z    at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.2960985Z    at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.2961677Z    at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
2020-09-18T22:42:29.2962334Z    at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.2963128Z    at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
2020-09-18T22:42:29.2964199Z    at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(HttpClient client, HttpRequestMessage request, Boolean keepAuthorization) in /home/vsts/work/1/s/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:line 1361
2020-09-18T22:42:29.2965234Z    at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() in /home/vsts/work/1/s/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:line 1518
2020-09-18T22:42:29.2966061Z VERBOSE:    at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
2020-09-18T22:42:29.2966834Z    at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
2020-09-18T22:42:29.2967362Z VERBOSE: 
2020-09-18T22:42:29.2967651Z PSMessageDetails      : 
2020-09-18T22:42:29.2968153Z Exception             : System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
2020-09-18T22:42:29.2969120Z                          ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
2020-09-18T22:42:29.2970065Z                          ---> Interop+OpenSsl+SslException: SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL.
2020-09-18T22:42:29.2971078Z                          ---> Interop+Crypto+OpenSslCryptographicException: error:141A90B5:SSL routines:ssl_cipher_list_to_bytes:no ciphers available
2020-09-18T22:42:29.2971925Z                            --- End of inner exception stack trace ---
2020-09-18T22:42:29.2972478Z                            at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, ReadOnlySpan`1 input, Byte[]& sendBuf, Int32& sendCount)
2020-09-18T22:42:29.2973294Z                            at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)
2020-09-18T22:42:29.2974285Z                            --- End of inner exception stack trace ---
2020-09-18T22:42:29.2974912Z                            at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
2020-09-18T22:42:29.2975716Z                            at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
2020-09-18T22:42:29.2976571Z                            --- End of inner exception stack trace ---
2020-09-18T22:42:29.2977209Z                            at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
2020-09-18T22:42:29.2977994Z                            at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.2978740Z                            at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.2979640Z                            at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.2980472Z                            at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
2020-09-18T22:42:29.2981330Z                            at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.2982192Z                            at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
2020-09-18T22:42:29.2983300Z                            at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(HttpClient client, HttpRequestMessage request, Boolean keepAuthorization) in /home/vsts/work/1/s/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:line 1361
2020-09-18T22:42:29.2984528Z                            at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() in /home/vsts/work/1/s/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:line 1518
2020-09-18T22:42:29.2985877Z TargetObject          : Method: GET, RequestUri: 'https://127.0.0.1:8085/Get', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
2020-09-18T22:42:29.2986533Z                         {
2020-09-18T22:42:29.2987136Z                           User-Agent: Mozilla/5.0
2020-09-18T22:42:29.2988030Z                           User-Agent: (Linux; Linux 4.15.0-1095-azure #105~16.04.1-Ubuntu SMP Sun Sep 6 00:30:35 UTC 2020; en-US)
2020-09-18T22:42:29.2988861Z                           User-Agent: PowerShell/7.1.0
2020-09-18T22:42:29.2989505Z                           Content-Length: 0
2020-09-18T22:42:29.2990681Z                         }
2020-09-18T22:42:29.2991401Z CategoryInfo          : InvalidOperation: (Method: GET, Reques…Content-Length: 0
2020-09-18T22:42:29.2992258Z                         }:HttpRequestMessage) [Invoke-WebRequest], HttpRequestException
2020-09-18T22:42:29.2992897Z FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
2020-09-18T22:42:29.2993467Z ErrorDetails          : Authentication failed, see inner exception.
2020-09-18T22:42:29.2993968Z InvocationInfo        : System.Management.Automation.InvocationInfo
2020-09-18T22:42:29.2994690Z ScriptStackTrace      : at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 1746
2020-09-18T22:42:29.2995703Z                         at Invoke-Test, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/It.ps1: line 289
2020-09-18T22:42:29.3001270Z                         at ItImpl, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/It.ps1: line 237
2020-09-18T22:42:29.3002065Z                         at It, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/It.ps1: line 132
2020-09-18T22:42:29.3002743Z                         at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 1736
2020-09-18T22:42:29.3003480Z                         at DescribeImpl, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Describe.ps1: line 213
2020-09-18T22:42:29.3004323Z                         at Context, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Context.ps1: line 92
2020-09-18T22:42:29.3005054Z                         at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 1689
2020-09-18T22:42:29.3007282Z                         at DescribeImpl, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Describe.ps1: line 213
2020-09-18T22:42:29.3012485Z                         at Describe, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Describe.ps1: line 105
2020-09-18T22:42:29.3013468Z                         at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 371
2020-09-18T22:42:29.3014340Z                         at <ScriptBlock>, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Pester.psm1: line 1111
2020-09-18T22:42:29.3015446Z                         at Invoke-Pester<End>, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Pester.psm1: line 1137
2020-09-18T22:42:29.3021746Z                         at <ScriptBlock>, <No file>: line 1
2020-09-18T22:42:29.3022306Z PipelineIterationInfo : {}
2020-09-18T22:42:29.3022643Z 
2020-09-18T22:42:29.3022863Z 
2020-09-18T22:42:29.3023078Z 
2020-09-18T22:42:29.3023355Z VERBOSE: 
2020-09-18T22:42:29.3024035Z �[92mException             : �[0m
2020-09-18T22:42:29.3024713Z     �[92mType           : �[0mSystem.Net.Http.HttpRequestException
2020-09-18T22:42:29.3025363Z     �[92mTargetSite     : �[0m
2020-09-18T22:42:29.3026037Z         �[92mName          : �[0mMoveNext
2020-09-18T22:42:29.3032447Z         �[92mDeclaringType : �[0mSystem.Net.Http.ConnectHelper+<EstablishSslConnectionAsyncCore>d__4, System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
2020-09-18T22:42:29.3044598Z         �[92mMemberType    : �[0mMethod
2020-09-18T22:42:29.3045541Z         �[92mModule        : �[0mSystem.Net.Http.dll
2020-09-18T22:42:29.3046159Z     �[92mStackTrace     : �[0m
2020-09-18T22:42:29.3048092Z    at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
2020-09-18T22:42:29.3053632Z    at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.3054505Z    at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.3055219Z    at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.3055982Z    at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
2020-09-18T22:42:29.3056688Z    at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2020-09-18T22:42:29.3063204Z    at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
2020-09-18T22:42:29.3064374Z    at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(HttpClient client, HttpRequestMessage request, Boolean keepAuthorization) in /home/vsts/work/1/s/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:line 1361
2020-09-18T22:42:29.3065505Z    at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() in /home/vsts/work/1/s/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:line 1518
2020-09-18T22:42:29.3066709Z     �[92mMessage        : �[0mThe SSL connection could not be established, see inner exception.
2020-09-18T22:42:29.3130514Z     �[92mInnerException : �[0m
2020-09-18T22:42:29.3131453Z         �[92mType           : �[0mSystem.Security.Authentication.AuthenticationException
2020-09-18T22:42:29.3132151Z         �[92mTargetSite     : �[0m
2020-09-18T22:42:29.3132763Z             �[92mName          : �[0mMoveNext
2020-09-18T22:42:29.3133605Z             �[92mDeclaringType : �[0mSystem.Net.Security.SslStream+<ForceAuthenticationAsync>d__171`1[TIOAdapter]
2020-09-18T22:42:29.3134341Z             �[92mMemberType    : �[0mMethod
2020-09-18T22:42:29.3140907Z             �[92mModule        : �[0mSystem.Net.Security.dll
2020-09-18T22:42:29.3141683Z         �[92mStackTrace     : �[0m
2020-09-18T22:42:29.3142308Z    at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
2020-09-18T22:42:29.3143262Z    at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Boolean async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
2020-09-18T22:42:29.3144207Z         �[92mMessage        : �[0mAuthentication failed, see inner exception.
2020-09-18T22:42:29.3150635Z         �[92mInnerException : �[0m
2020-09-18T22:42:29.3151421Z             �[92mType           : �[0mInterop+OpenSsl+SslException
2020-09-18T22:42:29.3152038Z             �[92mTargetSite     : �[0m
2020-09-18T22:42:29.3152841Z                 �[92mName          : �[0mDoSslHandshake
2020-09-18T22:42:29.3153762Z                 �[92mDeclaringType : �[0mInterop+OpenSsl, System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
2020-09-18T22:42:29.3154593Z                 �[92mMemberType    : �[0mMethod
2020-09-18T22:42:29.3161040Z                 �[92mModule        : �[0mSystem.Net.Security.dll
2020-09-18T22:42:29.3161836Z             �[92mStackTrace     : �[0m
2020-09-18T22:42:29.3162407Z    at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, ReadOnlySpan`1 input, Byte[]& sendBuf, Int32& sendCount)
2020-09-18T22:42:29.3163204Z    at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)
2020-09-18T22:42:29.3180782Z             �[92mMessage        : �[0mSSL Handshake failed with OpenSSL error - SSL_ERROR_SSL.
2020-09-18T22:42:29.3181822Z             �[92mInnerException : �[0m
2020-09-18T22:42:29.3182553Z                 �[92mType    : �[0mInterop+Crypto+OpenSslCryptographicException
2020-09-18T22:42:29.3183392Z                 �[92mMessage : �[0merror:141A90B5:SSL routines:ssl_cipher_list_to_bytes:no ciphers available
2020-09-18T22:42:29.3184238Z                 �[92mHResult : �[0m337285301
2020-09-18T22:42:29.3184862Z             �[92mSource         : �[0mSystem.Net.Security
2020-09-18T22:42:29.3185505Z             �[92mHResult        : �[0m-2146233088
2020-09-18T22:42:29.3191696Z         �[92mSource         : �[0mSystem.Net.Security
2020-09-18T22:42:29.3192509Z         �[92mHResult        : �[0m-2146233087
2020-09-18T22:42:29.3193318Z     �[92mSource         : �[0mSystem.Net.Http
2020-09-18T22:42:29.3193936Z     �[92mHResult        : �[0m-2146233087
2020-09-18T22:42:29.3195001Z �[92mTargetObject          : �[0mMethod: GET, RequestUri: 'https://127.0.0.1:8085/Get', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
2020-09-18T22:42:29.3200955Z                         {
2020-09-18T22:42:29.3201850Z                         User-Agent: Mozilla/5.0
2020-09-18T22:42:29.3202754Z                         User-Agent: (Linux; Linux 4.15.0-1095-azure #105~16.04.1-Ubuntu SMP Sun Sep 6 00:30:35 UTC 2020; en-US)
2020-09-18T22:42:29.3203600Z                         User-Agent: PowerShell/7.1.0
2020-09-18T22:42:29.3204776Z                         Content-Length: 0
2020-09-18T22:42:29.3205975Z                         }
2020-09-18T22:42:29.3212173Z �[92mCategoryInfo          : �[0mInvalidOperation: (Method: GET, Reques…Content-Length: 0
2020-09-18T22:42:29.3213267Z                         }:HttpRequestMessage) [Invoke-WebRequest], HttpRequestException
2020-09-18T22:42:29.3214194Z �[92mFullyQualifiedErrorId : �[0mWebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
2020-09-18T22:42:29.3215050Z �[92mErrorDetails          : �[0mAuthentication failed, see inner exception.
2020-09-18T22:42:29.3220185Z �[92mInvocationInfo        : �[0m
2020-09-18T22:42:29.3220947Z     �[92mMyCommand        : �[0mInvoke-WebRequest
2020-09-18T22:42:29.3221601Z     �[92mScriptLineNumber : �[0m1746
2020-09-18T22:42:29.3222187Z     �[92mOffsetInLine     : �[0m33
2020-09-18T22:42:29.3222789Z     �[92mHistoryId        : �[0m1
2020-09-18T22:42:29.3223605Z     �[92mScriptName       : �[0m/home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
2020-09-18T22:42:29.3229414Z     �[92mLine             : �[0m$response = Invoke-WebRequest @params -ErrorAction Stop
2020-09-18T22:42:29.3230009Z                        
2020-09-18T22:42:29.3231040Z     �[92mPositionMessage  : �[0mAt /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1:1746 char:33
2020-09-18T22:42:29.3232016Z                        + …               $response = Invoke-WebRequest @params -ErrorAction Stop
2020-09-18T22:42:29.3237296Z                        +                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-09-18T22:42:29.3238403Z     �[92mPSScriptRoot     : �[0m/home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility
2020-09-18T22:42:29.3239446Z     �[92mPSCommandPath    : �[0m/home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
2020-09-18T22:42:29.3240174Z     �[92mInvocationName   : �[0mInvoke-WebRequest
2020-09-18T22:42:29.3240807Z     �[92mCommandOrigin    : �[0mInternal
2020-09-18T22:42:29.3247461Z �[92mScriptStackTrace      : �[0mat <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 1746
2020-09-18T22:42:29.3248580Z                         at Invoke-Test, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/It.ps1: line 289
2020-09-18T22:42:29.3249270Z                         at ItImpl, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/It.ps1: line 237
2020-09-18T22:42:29.3249848Z                         at It, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/It.ps1: line 132
2020-09-18T22:42:29.3250494Z                         at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 1736
2020-09-18T22:42:29.3252473Z                         at DescribeImpl, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Describe.ps1: line 213
2020-09-18T22:42:29.3258278Z                         at Context, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Context.ps1: line 92
2020-09-18T22:42:29.3259125Z                         at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 1689
2020-09-18T22:42:29.3259994Z                         at DescribeImpl, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Describe.ps1: line 213
2020-09-18T22:42:29.3260680Z                         at Describe, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Functions/Describe.ps1: line 105
2020-09-18T22:42:29.3261377Z                         at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1: line 371
2020-09-18T22:42:29.3267711Z                         at <ScriptBlock>, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Pester.psm1: line 1111
2020-09-18T22:42:29.3268866Z                         at Invoke-Pester<End>, /home/vsts/work/1/a/bins/publish/Modules/Pester/4.10.1/Pester.psm1: line 1137
2020-09-18T22:42:29.3269458Z                         at <ScriptBlock>, <No file>: line 1

The error itself is thrown here:

response = client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, _cancelToken.Token).GetAwaiter().GetResult();

With the failing tests being:

It "Verifies Invoke-WebRequest -SslProtocol <SslProtocol> works on <ActualProtocol>" -TestCases ($entry.Test) -Pending:($entry.Pending) {
param($SslProtocol, $ActualProtocol)
$params = @{
Uri = Get-WebListenerUrl -Test 'Get' -Https -SslProtocol $ActualProtocol
SslProtocol = $SslProtocol
SkipCertificateCheck = $true
}
$response = Invoke-WebRequest @params
$result = $Response.Content | ConvertFrom-Json
$result.headers.Host | Should -Be $params.Uri.Authority
}

and

It "Verifies Invoke-RestMethod -SslProtocol <SslProtocol> works on <ActualProtocol>" -TestCases ($entry.Test) -Pending:($entry.Pending) {
param($SslProtocol, $ActualProtocol)
$params = @{
Uri = Get-WebListenerUrl -Test 'Get' -Https -SslProtocol $ActualProtocol
SslProtocol = $SslProtocol
SkipCertificateCheck = $true
}
$result = Invoke-RestMethod @params
$result.headers.Host | Should -Be $params.Uri.Authority
}

Suggested resolution

Interop+Crypto+OpenSslCryptographicException is a private nested type, and the type it inherits from is internal. This makes them unsafe to depend on.

Given the way the underlying platform fails, I think we're going to have a hard time differentiating this failure from other failures to users.

I think ideally we should:

  • Keep throwing an error -- since there's not much else we can do
  • Change the message or reason on the error if we think it's possible to do so consistently, so that fixing the issue is easier
  • Change the tests to expect the given errors on the platforms where they occur

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productRelease-TestingResolution-No ActivityIssue has had no activity for 6 months or moreWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility moduleWG-Quality-Testissues in a test or in test infrastructure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions