Skip to content

Commit

Permalink
[MWRAPPER-153] - Fixed only-mvnw.cmd fails when FIPS mode is enabled …
Browse files Browse the repository at this point in the history
…on Windows hosts Changed MD5 to SHA256 (#157)

The script fails on Windows when FIPS mode is enabled. SHA256 enables working properly.
  • Loading branch information
zbalkan authored Dec 14, 2024
1 parent 7c16331 commit 8a43246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maven-wrapper-distribution/src/resources/only-mvnw.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
if ($env:MAVEN_USER_HOME) {
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
}
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"

if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
Expand Down

0 comments on commit 8a43246

Please sign in to comment.