PowerShell/test/tools/Modules/WebListener
Mark Kraus ecf0f8c151 Add SslProtocol Support to WebCmdlets (#5329)
closes #2662

This feature adds the ability to restrict the SSL/TLS protocol used when making the web request. In 5.1 the user could make use of .NET API's to enforce this on the Web Cmdlets. With the move to HttpClient in PowerShell Core, those APIs have no impact. The user still has requirements to ensure specific protocols are used.

The public enum WebSslProtocol is added as a wrapper to the underlying SslProtocols enum. Neither it nor SecurityProtocolType can be used because Ssl3 and Ssl2 are not supported by HttpClientHandler.SslProtocols. While it may not be intuitive to a PowerShell user to use -bor or "Tls, Tls11" to set multiple options, the general use case for this will be a single protocol.

Adds -SslProtocol parameter to Web Cmdlets
Adds WebSslProtocol Enum to support limited subset of SslProtocol enum supported by HttpClientHandler
Adds TLS 1.1 and TLS 1.0 listening ports to WebListener
2017-11-13 10:45:46 -08:00
..
ClientCert.pfx Add test WebListener module and tests for Web Cmdlet Certificate Authentication (#4622) 2017-08-31 13:30:35 +04:00
README.md Add SslProtocol Support to WebCmdlets (#5329) 2017-11-13 10:45:46 -08:00
ServerCert.pfx Add test WebListener module and tests for Web Cmdlet Certificate Authentication (#4622) 2017-08-31 13:30:35 +04:00
WebListener.psd1 Add test WebListener module and tests for Web Cmdlet Certificate Authentication (#4622) 2017-08-31 13:30:35 +04:00
WebListener.psm1 Add SslProtocol Support to WebCmdlets (#5329) 2017-11-13 10:45:46 -08:00

WebListener Module

A PowerShell module for managing the WebListener App. The included SelF-Signed Certificate ServerCert.pfx has the password set to password and is issued for the Client and Server Authentication key usages. This certificate is used by the WebListener App for SSL/TLS. The included SelF-Signed Certificate ClientCert.pfx has the password set to password and has not been issued for any specific key usage. This Certificate is used for Client Certificate Authentication with the WebListener App. The port used for -HttpsPort will use TLS 1.2.

Running WebListener

Import-Module .\build.psm1
Publish-PSTestTools
$Listener = Start-WebListener -HttpPort 8083 -HttpsPort 8084 -Tls11Port 8085 -TlsPort 8086

Stopping WebListener

Stop-WebListener