Author: markt
Date: Mon Sep 29 10:42:48 2014
New Revision: 1628157

URL: http://svn.apache.org/r1628157
Log:
Ensure that ConcurrentMessageDigest has been configured to use the requested 
algorithm.
Note that this still results in a call to MessageDigest.getInstance() which 
will trigger the NoSuchAlgorithmException if necessary

Modified:
    
tomcat/trunk/java/org/apache/catalina/realm/MessageDigestCredentialHandler.java

Modified: 
tomcat/trunk/java/org/apache/catalina/realm/MessageDigestCredentialHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/MessageDigestCredentialHandler.java?rev=1628157&r1=1628156&r2=1628157&view=diff
==============================================================================
--- 
tomcat/trunk/java/org/apache/catalina/realm/MessageDigestCredentialHandler.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/realm/MessageDigestCredentialHandler.java 
Mon Sep 29 10:42:48 2014
@@ -19,7 +19,6 @@ package org.apache.catalina.realm;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
-import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.Arrays;
 
@@ -88,7 +87,7 @@ public class MessageDigestCredentialHand
 
     @Override
     public void setAlgorithm(String algorithm) throws NoSuchAlgorithmException 
{
-        MessageDigest.getInstance(algorithm);
+        ConcurrentMessageDigest.init(algorithm);
         this.algorithm = algorithm;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to