Class CSRBuilder

    • Method Detail

      • addDomain

        public void addDomain​(String domain)
        Adds a domain name to the CSR. The first domain name added will also be the Common Name. All domain names will be added as Subject Alternative Name.

        IDN domain names are ACE encoded automatically.

        For wildcard certificates, the domain name must be prefixed with "*.".

        Parameters:
        domain - Domain name to add
      • addDomains

        public void addDomains​(Collection<String> domains)
        Adds a Collection of domains.

        IDN domain names are ACE encoded automatically.

        Parameters:
        domains - Collection of domain names to add
      • addDomains

        public void addDomains​(String... domains)
        Adds multiple domain names.

        IDN domain names are ACE encoded automatically.

        Parameters:
        domains - Domain names to add
      • addIP

        public void addIP​(InetAddress address)
        Adds an InetAddress. All IP addresses will be set as iPAddress Subject Alternative Name.
        Parameters:
        address - InetAddress to add
        Since:
        2.4
      • addIPs

        public void addIPs​(InetAddress... ips)
        Adds multiple IP addresses.
        Parameters:
        ips - IP addresses to add
        Since:
        2.4
      • setOrganization

        public void setOrganization​(String o)
        Sets the organization.

        Note that it is at the discretion of the ACME server to accept this parameter.

      • setOrganizationalUnit

        public void setOrganizationalUnit​(String ou)
        Sets the organizational unit.

        Note that it is at the discretion of the ACME server to accept this parameter.

      • setLocality

        public void setLocality​(String l)
        Sets the city or locality.

        Note that it is at the discretion of the ACME server to accept this parameter.

      • setState

        public void setState​(String st)
        Sets the state or province.

        Note that it is at the discretion of the ACME server to accept this parameter.

      • setCountry

        public void setCountry​(String c)
        Sets the country.

        Note that it is at the discretion of the ACME server to accept this parameter.

      • getCSR

        public org.bouncycastle.pkcs.PKCS10CertificationRequest getCSR()
        Gets the PKCS#10 certification request.