necouchman commented on a change in pull request #440: GUACAMOLE-774: Fix 
deprecation issue with Java 9 and up.
URL: https://github.com/apache/guacamole-client/pull/440#discussion_r313552415
 
 

 ##########
 File path: 
extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusAuthenticationProviderModule.java
 ##########
 @@ -71,11 +74,28 @@ public 
RadiusAuthenticationProviderModule(AuthenticationProvider authProvider)
                     || innerProtocol == RadiusAuthenticationProtocol.MSCHAPv1 
                     || innerProtocol == RadiusAuthenticationProtocol.MSCHAPv2) 
{
             
-            Security.addProvider(new Provider("MD4", 0.00, "MD4 for MSCHAPv1/2 
Support") {
-                {
-                    this.put("MessageDigest.MD4", 
org.bouncycastle.jce.provider.JDKMessageDigest.MD4.class.getName());
-                }
-            });
+            try {
+                Provider md4Provider;
+                Constructor providerConstructor = Provider.class
+                        .getConstructor(String.class, String.class, 
String.class);
+                if (providerConstructor != null)
+                    md4Provider = (Provider) providerConstructor
+                            .newInstance("MD4", "0.00", "MD4 for MSCHAPv1/2 
Support");
 
 Review comment:
   Well, I implemented the above code, and verified that the module loads 
successfully when configured for `mschapv1` or `mschapv2`, which should 
indicate that it's able to load the MD4 code.  I'm reasonably certain that MD4 
support was removed in Java 1.8, which is what I'm running, so I'm pretty sure 
this is working as intended.  Just hard to say for sure.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to