mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
12.38.2011 3af0b06b4cb3c16c04a705f5f0c5a8e12c92ce4d
Issue OPENDJ-262: Implement pass through authentication (PTA)

Avoid NPE if no trust manager has been configured (i.e. when the default JVM trust manager is to be used).
1 files modified
9 ■■■■■ changed files
opends/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyFactory.java 9 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyFactory.java
@@ -638,16 +638,19 @@
          if (options.isUseSSL())
          {
            // Obtain the configured trust manager which will be used in order
            // to determine the trust of the remote LDAP server.
            // Obtain the optional configured trust manager which will be used
            // in order to determine the trust of the remote LDAP server.
            TrustManager[] tm = null;
            DN trustManagerDN = options.getTrustManagerProviderDN();
            if (trustManagerDN != null)
            {
            TrustManagerProvider<?> trustManagerProvider = DirectoryServer
                .getTrustManagerProvider(trustManagerDN);
            TrustManager[] tm = null;
            if (trustManagerProvider != null)
            {
              tm = trustManagerProvider.getTrustManagers();
            }
            }
            // Create the SSL context and initialize it.
            SSLContext sslContext = SSLContext.getInstance("TLS");