ticketmaster / poshspec

Infrastructure Testing DSL running in Pester
MIT License
183 stars 32 forks source link

Added fix for issue 28 -- accept invalid certs #29

Closed kenerwin88 closed 6 years ago

kenerwin88 commented 8 years ago

I believe the solution is to add:

Added for dealing with invalid certificates.

add-type -TypeDefinition @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; } } "@ [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy

to the http.ps1 file.