Blob Blame History Raw
From 8f7d5c7c763f66035dda86012d58744547672abe Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 28 Oct 2021 10:03:13 +0200
Subject: [PATCH] Remove use of deprecated SHA-1 and MD5 algorithms

---
 .../aether/repository/AuthenticationDigest.java       | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/maven-resolver-api/src/main/java/org/eclipse/aether/repository/AuthenticationDigest.java b/maven-resolver-api/src/main/java/org/eclipse/aether/repository/AuthenticationDigest.java
index 27b88c02..6236e7b2 100644
--- a/maven-resolver-api/src/main/java/org/eclipse/aether/repository/AuthenticationDigest.java
+++ b/maven-resolver-api/src/main/java/org/eclipse/aether/repository/AuthenticationDigest.java
@@ -98,18 +98,11 @@ public final class AuthenticationDigest
     {
         try
         {
-            return MessageDigest.getInstance( "SHA-1" );
+            return MessageDigest.getInstance( "SHA-256" );
         }
         catch ( NoSuchAlgorithmException e )
         {
-            try
-            {
-                return MessageDigest.getInstance( "MD5" );
-            }
-            catch ( NoSuchAlgorithmException ne )
-            {
-                throw new IllegalStateException( ne );
-            }
+            throw new IllegalStateException( e );
         }
     }
 
-- 
2.32.0