private CertificateAndKey generateRootCertificate(){
  long generationStart=System.currentTimeMillis();
  KeyPair caKeyPair=keyGenerator.generate();
  CertificateAndKey certificateAndKey=securityProviderTool.createCARootCertificate(rootCertificateInfo,caKeyPair,messageDigest);
  long generationFinished=System.currentTimeMillis();
  log.info("Generated CA root certificate and private key in {}ms. Key generator: {}. Signature algorithm: {}.",generationFinished - generationStart,keyGenerator,messageDigest);
  return certificateAndKey;
}

private CertificateAndKey generateRootCertificate ( ) { long generationStart = System . currentTimeMillis ( ) ; KeyPair caKeyPair = keyGenerator . generate ( ) ; CertificateAndKey certificateAndKey = securityProviderTool . createCARootCertificate ( rootCertificateInfo , caKeyPair , messageDigest ) ; long generationFinished = System . currentTimeMillis ( ) ; log . info ( "Generated CA root certificate and private key in {}ms. Key generator: {}. Signature algorithm: {}." , generationFinished - generationStart , keyGenerator , messageDigest ) ; return certificateAndKey ; }
generates a new ca root certificate and private key .
