@Override public CertificateInfo generate(List<String> hostnames, X509Certificate originalCertificate) { if (hostnames == null || hostnames.size() < 1) { throw new IllegalArgumentException("Cannot create X.509 certificate without server hostname"); } // take the first entry as the CN String commonName = hostnames.get(0); return new CertificateInfo() .commonName(commonName) .organization(DEFAULT_IMPERSONATED_CERT_ORG) .organizationalUnit(DEFAULT_IMPERSONATED_CERT_ORG_UNIT) .notBefore(getNotBefore()) .notAfter(getNotAfter()) .subjectAlternativeNames(hostnames); }
@Override public CertificateInfo generate(List<String> hostnames, X509Certificate originalCertificate) { if (hostnames == null || hostnames.size() < 1) { throw new IllegalArgumentException("Cannot create X.509 certificate without server hostname"); } // take the first entry as the CN String commonName = hostnames.get(0); return new CertificateInfo() .commonName(commonName) .organization(DEFAULT_IMPERSONATED_CERT_ORG) .organizationalUnit(DEFAULT_IMPERSONATED_CERT_ORG_UNIT) .notBefore(getNotBefore()) .notAfter(getNotAfter()) .subjectAlternativeNames(hostnames); }
@Override public CertificateInfo generate(List<String> hostnames, X509Certificate originalCertificate) { if (hostnames == null || hostnames.size() < 1) { throw new IllegalArgumentException("Cannot create X.509 certificate without server hostname"); } // take the first entry as the CN String commonName = hostnames.get(0); return new CertificateInfo() .commonName(commonName) .organization(DEFAULT_IMPERSONATED_CERT_ORG) .organizationalUnit(DEFAULT_IMPERSONATED_CERT_ORG_UNIT) .notBefore(getNotBefore()) .notAfter(getNotAfter()) .subjectAlternativeNames(hostnames); }