public void initRootCert() {
    LOG.info("Initialization of root certificate");
    boolean certExists = isCertExists();
    LOG.info("Certificate exists:" + certExists);

    if (!certExists) {
      generateServerCertificate();
    }
  }
Verify that root certificate exists, generate it otherwise.
ambari-server/src/main/java/org/apache/ambari/server/security/CertificateManager.java