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

dugan
03.10.2009 fb26edfd7275b479531d2cc1fb715e114622f11e
opends/src/server/org/opends/server/crypto/CryptoManagerImpl.java
@@ -489,11 +489,13 @@
   * from the ADS backed keystore). If the certificate entry does not
   * yet exist in the truststore backend, the truststore is signaled
   * to initialized that entry, and the newly generated certificate
   * is then retrieved and returned.
   * is then retrieved and returned. The certificate returned can never
   * be null.
   *
   * @return This instance's instance-key public-key certificate from
   * the local truststore backend.
   * @throws CryptoManagerException If the certificate cannot be
   * retrieved.
   * retrieved, or, was not able to be initialized by the trust-store.
   */
  static byte[] getInstanceKeyCertificateFromLocalTruststore()
          throws CryptoManagerException {
@@ -572,6 +574,13 @@
            ERR_CRYPTOMGR_FAILED_TO_RETRIEVE_INSTANCE_CERTIFICATE.get(
                    entryDN.toString(), getExceptionMessage(ex)), ex);
    }
    //The certificate can never be null. The Message digest code that will
    //use it later throws a NPE if the certificate is null.
    if(certificate == null) {
      Message msg =
        ERR_CRYPTOMGR_FAILED_INSTANCE_CERTIFICATE_NULL.get(entryDN.toString());
        throw new CryptoManagerException(msg);
    }
    return(certificate);
  }