@@ -367,12 +367,6 @@ $redirectTests = @(
367367 @ {redirectType = ' relative' ; redirectedMethod = ' GET' }
368368)
369369
370- $PendingCertificateTest = $false
371- # we can't check for Certificate on MacOS and Centos libcurl (currently 7.29.0) returns the following error:
372- # The handler does not support client authentication certificates with this combination of libcurl (7.29.0) and its SSL backend ("NSS/3.21 Basic ECC")
373- if ( $IsMacOS ) { $PendingCertificateTest = $true }
374- if ( test-path / etc/ centos- release ) { $PendingCertificateTest = $true }
375-
376370Describe " Invoke-WebRequest tests" - Tags " Feature" {
377371 BeforeAll {
378372 $WebListener = Start-WebListener
@@ -1182,9 +1176,7 @@ Describe "Invoke-WebRequest tests" -Tags "Feature" {
11821176 $result.Status | Should - Be ' FAILED'
11831177 }
11841178
1185- # Test skipped on macOS and CentOS pending support for Client Certificate Authentication
1186- # https://github.com/PowerShell/PowerShell/issues/4650
1187- It " Verifies Invoke-WebRequest Certificate Authentication Successful with -Certificate" - Pending:$PendingCertificateTest {
1179+ It " Verifies Invoke-WebRequest Certificate Authentication Successful with -Certificate" {
11881180 $uri = Get-WebListenerUrl - Https - Test ' Cert'
11891181 $certificate = Get-WebListenerClientCertificate
11901182 $result = Invoke-WebRequest - Uri $uri - Certificate $certificate - SkipCertificateCheck |
@@ -1554,16 +1546,15 @@ Describe "Invoke-WebRequest tests" -Tags "Feature" {
15541546 @ { Test = @ {SslProtocol = ' Tls' ; ActualProtocol = ' Tls' }; Pending = $false }
15551547 @ { Test = @ {SslProtocol = ' Tls11' ; ActualProtocol = ' Tls11' }; Pending = $false }
15561548 @ { Test = @ {SslProtocol = ' Tls12' ; ActualProtocol = ' Tls12' }; Pending = $false }
1557- # macOS does not support multiple SslProtocols
1558- @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls12' }; Pending = $IsMacOS }
1559- @ { Test = @ {SslProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls12' }; Pending = $IsMacOS }
1560- @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $IsMacOS }
1561- @ { Test = @ {SslProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $IsMacOS }
1562- @ { Test = @ {SslProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls11' }; Pending = $IsMacOS }
1563- @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls' }; Pending = $IsMacOS }
1564- @ { Test = @ {SslProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls' }; Pending = $IsMacOS }
1565- @ { Test = @ {SslProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls' }; Pending = $IsMacOS }
1566- # macOS does not support multiple SslProtocols and possible CoreFX issue for this combo on Linux
1549+ @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls12' }; Pending = $false }
1550+ @ { Test = @ {SslProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls12' }; Pending = $false }
1551+ @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $false }
1552+ @ { Test = @ {SslProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $false }
1553+ @ { Test = @ {SslProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls11' }; Pending = $false }
1554+ @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls' }; Pending = $false }
1555+ @ { Test = @ {SslProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls' }; Pending = $false }
1556+ # Skipping intermediary protocols is not supported on all platforms
1557+ @ { Test = @ {SslProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls' }; Pending = -not $IsWindows }
15671558 @ { Test = @ {SslProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls12' }; Pending = -not $IsWindows }
15681559 )
15691560
@@ -1574,10 +1565,9 @@ Describe "Invoke-WebRequest tests" -Tags "Feature" {
15741565 @ { Test = @ {IntendedProtocol = ' Tls12' ; ActualProtocol = ' Tls11' }; Pending = $false }
15751566 @ { Test = @ {IntendedProtocol = ' Tls11' ; ActualProtocol = ' Tls' }; Pending = $false }
15761567 @ { Test = @ {IntendedProtocol = ' Tls12' ; ActualProtocol = ' Tls' }; Pending = $false }
1577- # macOS does not support multiple SslProtocols
1578- @ { Test = @ {IntendedProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls' }; Pending = $IsMacOS }
1579- @ { Test = @ {IntendedProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $IsMacOS }
1580- @ { Test = @ {IntendedProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls12' }; Pending = $IsMacOS }
1568+ @ { Test = @ {IntendedProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls' }; Pending = $false }
1569+ @ { Test = @ {IntendedProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $false }
1570+ @ { Test = @ {IntendedProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls12' }; Pending = $false }
15811571 )
15821572 }
15831573
@@ -2256,9 +2246,7 @@ Describe "Invoke-RestMethod tests" -Tags "Feature" {
22562246 $result.Status | Should - Be ' FAILED'
22572247 }
22582248
2259- # Test skipped on macOS and CentOS pending support for Client Certificate Authentication
2260- # https://github.com/PowerShell/PowerShell/issues/4650
2261- It " Verifies Invoke-RestMethod Certificate Authentication Successful with -Certificate" - Pending:$PendingCertificateTest {
2249+ It " Verifies Invoke-RestMethod Certificate Authentication Successful with -Certificate" {
22622250 $uri = Get-WebListenerUrl - Https - Test ' Cert'
22632251 $certificate = Get-WebListenerClientCertificate
22642252 $result = Invoke-RestMethod - uri $uri - Certificate $certificate - SkipCertificateCheck
@@ -2770,16 +2758,15 @@ Describe "Invoke-RestMethod tests" -Tags "Feature" {
27702758 @ { Test = @ {SslProtocol = ' Tls' ; ActualProtocol = ' Tls' }; Pending = $false }
27712759 @ { Test = @ {SslProtocol = ' Tls11' ; ActualProtocol = ' Tls11' }; Pending = $false }
27722760 @ { Test = @ {SslProtocol = ' Tls12' ; ActualProtocol = ' Tls12' }; Pending = $false }
2773- # macOS does not support multiple SslProtocols
2774- @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls12' }; Pending = $IsMacOS }
2775- @ { Test = @ {SslProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls12' }; Pending = $IsMacOS }
2776- @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $IsMacOS }
2777- @ { Test = @ {SslProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $IsMacOS }
2778- @ { Test = @ {SslProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls11' }; Pending = $IsMacOS }
2779- @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls' }; Pending = $IsMacOS }
2780- @ { Test = @ {SslProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls' }; Pending = $IsMacOS }
2781- @ { Test = @ {SslProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls' }; Pending = $IsMacOS }
2782- # macOS does not support multiple SslProtocols and possible CoreFX issue for this combo on Linux
2761+ @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls12' }; Pending = $false }
2762+ @ { Test = @ {SslProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls12' }; Pending = $false }
2763+ @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $false }
2764+ @ { Test = @ {SslProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $false }
2765+ @ { Test = @ {SslProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls11' }; Pending = $false }
2766+ @ { Test = @ {SslProtocol = ' Tls, Tls11, Tls12' ; ActualProtocol = ' Tls' }; Pending = $false }
2767+ @ { Test = @ {SslProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls' }; Pending = $false }
2768+ # Skipping intermediary protocols is not supported on all platforms
2769+ @ { Test = @ {SslProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls' }; Pending = -not $IsWindows }
27832770 @ { Test = @ {SslProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls12' }; Pending = -not $IsWindows }
27842771 )
27852772
@@ -2790,10 +2777,9 @@ Describe "Invoke-RestMethod tests" -Tags "Feature" {
27902777 @ { Test = @ {IntendedProtocol = ' Tls12' ; ActualProtocol = ' Tls11' }; Pending = $false }
27912778 @ { Test = @ {IntendedProtocol = ' Tls11' ; ActualProtocol = ' Tls' }; Pending = $false }
27922779 @ { Test = @ {IntendedProtocol = ' Tls12' ; ActualProtocol = ' Tls' }; Pending = $false }
2793- # macOS does not support multiple SslProtocols
2794- @ { Test = @ {IntendedProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls' }; Pending = $IsMacOS }
2795- @ { Test = @ {IntendedProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $IsMacOS }
2796- @ { Test = @ {IntendedProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls12' }; Pending = $IsMacOS }
2780+ @ { Test = @ {IntendedProtocol = ' Tls11, Tls12' ; ActualProtocol = ' Tls' }; Pending = $false }
2781+ @ { Test = @ {IntendedProtocol = ' Tls, Tls12' ; ActualProtocol = ' Tls11' }; Pending = $false }
2782+ @ { Test = @ {IntendedProtocol = ' Tls, Tls11' ; ActualProtocol = ' Tls12' }; Pending = $false }
27972783 )
27982784 }
27992785
0 commit comments