code: public SSLEngine createCertForHost(final String commonName,
              final SubjectAlternativeNameHolder subjectAlternativeNames)
              throws GeneralSecurityException, OperatorCreationException,
              IOException, ExecutionException {
          if (commonName == null) {
              throw new IllegalArgumentException(
                      "Error, 'commonName' is not allowed to be null!");
          }
          if (subjectAlternativeNames == null) {
              throw new IllegalArgumentException(
                      "Error, 'subjectAlternativeNames' is not allowed to be null!");
          }
  
          SSLContext ctx;
          if (serverSSLContexts == null) {
              ctx = createServerContext(commonName, subjectAlternativeNames);
          } else {
              ctx = serverSSLContexts.get(commonName, new Callable<SSLContext>() {
                  @Override
                  public SSLContext call() throws Exception {
                      return createServerContext(commonName,
                              subjectAlternativeNames);
                  }
              });
          }
          return ctx.createSSLEngine();
      }
docs: Generates an 1024 bit RSA key pair using SHA1PRNG. Thoughts: 2048 takes
  much longer time on older CPUs. And for almost every client, 1024 is
  sufficient.
  
  Derived from Zed Attack Proxy (ZAP). ZAP is an HTTP/HTTPS proxy for
  assessing web application security. Copyright 2011 mawoki@ymail.com
  Licensed under the Apache License, Version 2.0
  
  @param commonName
  the common name to use in the server certificate
  
  @param subjectAlternativeNames
  a List of the subject alternative names to use in the server
  certificate, could be empty, but must not be null
  
  @see org.parosproxy.paros.security.SslCertificateServiceImpl.
  createCertForHost(String)
  @see org.parosproxy.paros.network.SSLConnector.getTunnelSSLSocketFactory(
  String)