Welcome! Please see the About page for a little more info on how this works.

+4 votes
in Tools by
edited by

It looks like the default powershell module uses the MD5 crypto service provider to compute a hash for the cached classpath file (I think);

function Get-StringHash(str)  {
    $md5  = new-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider

Under certain installations of Windows with FIPS mandated (e.g. by the system admin), MD5 is simply disallowed and clj will fail with an error regarding FIPS in this function.

A simple alternative is to change to a compliant algorithm, e.g. SHA1,

function Get-StringHash(str)  {
    $md5  = new-Object -TypeName System.Security.Cryptography.SHA1CryptoServiceProvider

This should not have an effect on the operation of the clojure cli script, other than changing the actual hashed value of the classpath, which should be internally consistent with the script's prior runs. Unless something depends on the exact MD5 hash of the cpcache (it doesn't look like it), this should be a quick fix for cases where FIPS is forced.

1 Answer

0 votes
selected by
Best answer

Nothing depends on the exact form of the cache key so I think this would be fine. Logged at https://clojure.atlassian.net/browse/TDEPS-164