| | |
| | | import static org.opends.server.extensions.FileBasedKeyManagerProvider.getKeyStorePIN; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import static com.forgerock.opendj.util.StaticUtils.isFips; |
| | | |
| | | /** |
| | | * This class defines a trust manager provider that will reference certificates |
| | | * stored in a file located on the Directory Server filesystem. |
| | |
| | | trustManagerFactory.init(trustStore); |
| | | TrustManager[] trustManagers = trustManagerFactory.getTrustManagers(); |
| | | TrustManager[] newTrustManagers = new TrustManager[trustManagers.length]; |
| | | for (int i=0; i < trustManagers.length; i++) |
| | | { |
| | | newTrustManagers[i] = new ExpirationCheckTrustManager((X509TrustManager) trustManagers[i]); |
| | | if (isFips()) { |
| | | newTrustManagers = trustManagers; |
| | | } else { |
| | | for (int i=0; i < trustManagers.length; i++) |
| | | { |
| | | newTrustManagers[i] = new ExpirationCheckTrustManager((X509TrustManager) trustManagers[i]); |
| | | } |
| | | } |
| | | return newTrustManagers; |
| | | } |