This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-wrapper.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a43246  [MWRAPPER-153] - Fixed only-mvnw.cmd fails when FIPS mode is 
enabled on Windows hosts Changed MD5 to SHA256 (#157)
8a43246 is described below

commit 8a432464e53d0ba0d898ff4d5bb50e3fd782dad4
Author: Zafer Balkan <za...@zaferbalkan.com>
AuthorDate: Sun Dec 15 00:13:58 2024 +0200

    [MWRAPPER-153] - Fixed only-mvnw.cmd fails when FIPS mode is enabled on 
Windows hosts Changed MD5 to SHA256 (#157)
    
    The script fails on Windows when FIPS mode is enabled. SHA256 enables 
working properly.
---
 maven-wrapper-distribution/src/resources/only-mvnw.cmd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/maven-wrapper-distribution/src/resources/only-mvnw.cmd 
b/maven-wrapper-distribution/src/resources/only-mvnw.cmd
index d3e39f4..60e1993 100644
--- a/maven-wrapper-distribution/src/resources/only-mvnw.cmd
+++ b/maven-wrapper-distribution/src/resources/only-mvnw.cmd
@@ -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) {

Reply via email to