1
votes

I'm trying to use powershell to grab html content from an https site.

Unfortunately, the site only excepts a limited set of SSL / TLS cipher suites and the suites that are available to Powershell are not supported.

I get the following error message if I try use the Invoke-WebRequest cmdlet:

Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.

Questions:

  1. Is there a way to specify the client SSL / TLS cipher suites that powershell uses?
  2. Is there another cmdlet I can use to send web requests?

I'd like to not have to switch to an alternate language, but I may have to if there isn't a way to specify the cipher suite used by PowerShell.

Here are the suites the server supports:

TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (0x9f)

TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 (0x6b)

TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x39)

TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA (0x88)

TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e)

TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (0x67)

TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x33)

TLS_DHE_RSA_WITH_SEED_CBC_SHA (0x9a)

TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA (0x45)

1
What suites does the site accept?Nathan Tuggy
Added to original questionJustin Store
Add that as an answer, then.Nathan Tuggy

1 Answers

0
votes

My solution was to use the win32 build of Curl.exe with SSL support and then work with the returned html. Curl can be downloaded as a standalone exe from: link The Curl exe just has to be somewhere that is in the PATH environment variable or have the path hardcoded in the script.