Class HostnameCertificateInfoGenerator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CertificateInfo generate​(java.util.List<java.lang.String> hostnames, java.security.cert.X509Certificate originalCertificate)
      Generate a certificate for the specified hostnames, optionally using parameters from the originalCertificate.
      protected java.time.Instant getNotAfter()
      Returns the default Not After date for impersonated certificates.
      protected java.time.Instant getNotBefore()
      Returns the default Not Before date for impersonated certificates.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HostnameCertificateInfoGenerator

        public HostnameCertificateInfoGenerator()
    • Method Detail

      • generate

        public CertificateInfo generate​(java.util.List<java.lang.String> hostnames,
                                        java.security.cert.X509Certificate originalCertificate)
        Description copied from interface: CertificateInfoGenerator
        Generate a certificate for the specified hostnames, optionally using parameters from the originalCertificate.
        Specified by:
        generate in interface CertificateInfoGenerator
        Parameters:
        hostnames - the hostnames to generate the certificate for, which may include wildcards
        originalCertificate - original X.509 certificate sent by the upstream server, which may be null
        Returns:
        CertificateInfo to be used to create an X509Certificate for the specified hostnames
      • getNotBefore

        protected java.time.Instant getNotBefore()
        Returns the default Not Before date for impersonated certificates. Defaults to the current date minus 1 year.
        Returns:
        Instant
      • getNotAfter

        protected java.time.Instant getNotAfter()
        Returns the default Not After date for impersonated certificates. Defaults to the current date plus 1 year.
        Returns:
        Instant