mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-774: Fix RadiusConnectionservice class initilization for use with Guice.
This commit is contained in:
@@ -72,26 +72,27 @@ public class RadiusConnectionService {
|
|||||||
* Set up a new instance of this class, and check the provided
|
* Set up a new instance of this class, and check the provided
|
||||||
* authentication protocol. If the protocol requires MD4 support,
|
* authentication protocol. If the protocol requires MD4 support,
|
||||||
* this loads the required security providers.
|
* this loads the required security providers.
|
||||||
*
|
|
||||||
* @throws GuacamoleException
|
|
||||||
* If guacamole.properties cannot be parsed or an invalid
|
|
||||||
* authentication protocol is provided.
|
|
||||||
*/
|
*/
|
||||||
public RadiusConnectionService() throws GuacamoleException {
|
public RadiusConnectionService() {
|
||||||
|
|
||||||
RadiusAuthenticationProtocol authProtocol = confService.getRadiusAuthProtocol();
|
try {
|
||||||
|
RadiusAuthenticationProtocol authProtocol = confService.getRadiusAuthProtocol();
|
||||||
|
|
||||||
// Check for MS-CHAP and add MD4 support
|
// Check for MS-CHAP and add MD4 support
|
||||||
if (authProtocol == RadiusAuthenticationProtocol.MSCHAPv1
|
if (authProtocol == RadiusAuthenticationProtocol.MSCHAPv1
|
||||||
|| authProtocol == RadiusAuthenticationProtocol.MSCHAPv2) {
|
|| authProtocol == RadiusAuthenticationProtocol.MSCHAPv2) {
|
||||||
|
|
||||||
Security.addProvider(new Provider("MD4", 0.00, "MD4 for MSCHAPv1/2 RADIUS") {
|
Security.addProvider(new Provider("MD4", 0.00, "MD4 for MSCHAPv1/2 RADIUS") {
|
||||||
{
|
{
|
||||||
this.put("MessageDigest.MD4",
|
this.put("MessageDigest.MD4",
|
||||||
org.bouncycastle.jce.provider.JDKMessageDigest.MD4.class.getName());
|
org.bouncycastle.jce.provider.JDKMessageDigest.MD4.class.getName());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch(GuacamoleException e) {
|
||||||
|
logger.error("Could not retrieve RADIUS authentication protocol: {}", e.getMessage());
|
||||||
|
logger.debug("Failed to determine authentication protocol", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user