I have been provided a new Server 2012 box to setup.
I'm trying to use powershell to install chocolatey
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
and getting the error
Exception calling "DownloadString" with "1" argument(s): "The underlying connection was closed: An unexpected error
occurred on a receive."
At line:1 char:1
+ iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/in ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
I can visit that URL in the browser.
At first I thought this was something to do with Chocolatey but then I realised that
(New-Object System.Net.WebClient).DownloadString('http://google.com'))
can download the html content
but
((New-Object System.Net.WebClient).DownloadString('https://google.com'))
fails with the same error
The underlying connection was closed: An unexpected error occurred on a receive.
The box:
- is windows server 2012 build 9600
- doesn't use a proxy
- has the firewall turned off
I feel sure I'm doing something silly but can't see what...
--- Update ---
Based on this answer
I followed these steps:
``` 1.In Control Panel, click Administrative Tools, and then double-click Local Security Policy.
2.In Local Security Settings, expand Local Policies, and then click Security Options.
3.Under Policy in the right pane, double-click System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing, and then click Enabled.
- Ran gpupdate /force ```
After that the chocolatey install script can be downloaded but then fails with:
STDOUT: FIPS Mode detected - run 'choco feature enable -n useFipsCompliantChecksums'
to use Chocolatey.
When FIPS Mode is enabled, Chocolatey requires useFipsCompliantChecksums feature also be enabled.
STDERR:
---- End output of C:\ProgramData\chocolatey/bin/choco.exe list -l -r ----
Ran C:\ProgramData\chocolatey/bin/choco.exe list -l -r returned 1
Still feels like the GPO change shouldn't be necessary