clj-on-windows

For those interested in making clj on Windows https://dev.clojure.org/jira/browse/TDEPS-67. Also see https://github.com/littleli/scoop-clojure.
scotts 2019-03-09T00:40:16.155200Z

Option 1 installed nicely, but when I run clj I get a fips error

new-Object : Exception calling ".ctor" with "0" argument(s): "This implementation is not part of the Windows Platform FIPS validated
cryptographic algorithms."
At C:\Users\scott\Documents\WindowsPowerShell\Modules\ClojureTools\ClojureTools.psm1:2 char:10
+ $md5 = new-Object -TypeName System.Security.Cryptography.MD5CryptoS ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand 

malcolm.edgar 2019-03-09T02:13:44.159700Z

Thanks for making this Windows installer available. The clj tool is great, and I am enjoying learning deps. Script will work if I set:

Set-ExecutionPolicy Unrestricted -Scope CurrentUser
Otherwise script fails with message saying the remote script is not signed.
.\win-install-1.10.0.439.ps1 : File C:\Users\malco\Downloads\win-install-1.10.0.439.ps1 cannot be loaded because
running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\win-install-1.10.0.439.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
Please note after the policy change has been made, and the clojure installer has been run the user should unset this Unrestricted policy grant via:
Set-ExecutionPolicy Undefined -Scope CurrentUser

ajoberstar 2019-03-09T04:50:40.161100Z

@malcolm.edgar The wiki recommends setting it to RemoteSigned which is a safer and more common option than unrestricted.

malcolm.edgar 2019-03-09T05:11:03.162200Z

Thanks Andrew, unfortunately this didn’t work on my PC.

scotts 2019-03-09T12:40:53.163700Z

to get past the FIPS error i changed

System.Security.Cryptography.MD5CryptoServiceProvider
to
System.Security.Cryptography.SHA1CryptoServiceProvider