mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Updates to NTLM authentication component/provider to line up with new password encryptor code.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2762 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,6 +19,7 @@ package org.alfresco.repo.security.authentication.ntlm;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
@@ -599,7 +600,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
||||
|
||||
String username = (String) ntlmToken.getPrincipal();
|
||||
String plainPwd = (String) ntlmToken.getCredentials();
|
||||
byte[] ntlm1Pwd = m_encryptor.generateEncryptedPassword( plainPwd, authSess.getEncryptionKey(), PasswordEncryptor.NTLM1);
|
||||
byte[] ntlm1Pwd = m_encryptor.generateEncryptedPassword( plainPwd, authSess.getEncryptionKey(), PasswordEncryptor.NTLM1, null, null);
|
||||
|
||||
// Send the logon request to the authentication server
|
||||
//
|
||||
@@ -684,6 +685,12 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
||||
|
||||
throw new AuthenticationServiceException("JCE provider error", ex);
|
||||
}
|
||||
catch (InvalidKeyException ex)
|
||||
{
|
||||
// Problem creating key during encryption
|
||||
|
||||
throw new AuthenticationServiceException("Invalid key error", ex);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// Error connecting to the authentication server
|
||||
|
@@ -19,6 +19,7 @@ package org.alfresco.repo.security.authentication.ntlm;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
@@ -519,7 +520,7 @@ public class NTLMAuthenticationProvider implements AuthenticationProvider
|
||||
|
||||
String username = (String) ntlmToken.getPrincipal();
|
||||
String plainPwd = (String) ntlmToken.getCredentials();
|
||||
byte[] ntlm1Pwd = m_encryptor.generateEncryptedPassword( plainPwd, authSess.getEncryptionKey(), PasswordEncryptor.NTLM1);
|
||||
byte[] ntlm1Pwd = m_encryptor.generateEncryptedPassword( plainPwd, authSess.getEncryptionKey(), PasswordEncryptor.NTLM1, null, null);
|
||||
|
||||
// Send the logon request to the authentication server
|
||||
//
|
||||
@@ -560,6 +561,12 @@ public class NTLMAuthenticationProvider implements AuthenticationProvider
|
||||
|
||||
throw new AuthenticationServiceException("JCE provider error", ex);
|
||||
}
|
||||
catch (InvalidKeyException ex)
|
||||
{
|
||||
// Problem creating key during encryption
|
||||
|
||||
throw new AuthenticationServiceException("Invalid key error", ex);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// Error connecting to the authentication server
|
||||
|
Reference in New Issue
Block a user