Commit 24785a49 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1322: Preventing a NPE, removing an unneeded nullcheck.

parent a469be3e
......@@ -195,7 +195,6 @@ public class SASLAuthentication {
boolean trustedCert = false;
if (session.isSecure()) {
final LocalClientSession localClientSession = (LocalClientSession)session;
if (localClientSession != null) {
final Connection connection = localClientSession.getConnection();
final KeyStore keyStore = connection.getConfiguration().getIdentityStore().getStore();
final KeyStore trustStore = connection.getConfiguration().getTrustStore().getStore();
......@@ -204,7 +203,6 @@ public class SASLAuthentication {
trustedCert = true;
}
}
}
if (trustedCert == false) {
continue; // Do not offer EXTERNAL.
}
......
......@@ -184,7 +184,7 @@ public class CertificateManager {
*/
public static X509Certificate getEndEntityCertificate(Certificate chain[],
KeyStore certStore, KeyStore trustStore) {
if (chain.length == 0) {
if (chain == null || chain.length == 0) {
return null;
}
X509Certificate first = (X509Certificate) chain[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment