LDAP work in progress
This commit is contained in:
parent
17260644bb
commit
d593d99a01
@ -54,7 +54,7 @@ public class LdapDAO {
|
||||
} catch (IOException e) {
|
||||
throw new TechnicalException(e);
|
||||
} finally {
|
||||
close();
|
||||
disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,6 +71,7 @@ public class LdapDAO {
|
||||
tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest());
|
||||
final SSLContext sc = SSLContext.getInstance("TLSv1.2");
|
||||
final TrustManager tm = new X509TrustManager() {
|
||||
// TODO trusts everybody
|
||||
@Override
|
||||
public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
|
||||
}
|
||||
@ -96,7 +97,7 @@ public class LdapDAO {
|
||||
return ldapAttrs.get(attributeName).getAll().next().toString();
|
||||
}
|
||||
|
||||
private void close() {
|
||||
private void disconnect() {
|
||||
if (tls != null) {
|
||||
try {
|
||||
tls.close();
|
||||
|
Loading…
Reference in New Issue
Block a user