Class AcmeAccount.Builder

  • Enclosing class:
    AcmeAccount

    public static class AcmeAccount.Builder
    extends Object
    • Field Detail

      • DEFAULT_ACCOUNT_KEY_ALGORITHM_NAME

        public static final String DEFAULT_ACCOUNT_KEY_ALGORITHM_NAME
        The default account key algorithm name.
        See Also:
        Constant Field Values
      • DEFAULT_ACCOUNT_KEY_SIZE

        public static final int DEFAULT_ACCOUNT_KEY_SIZE
        The default account key size that will be used if the key algorithm name is not EC.
        See Also:
        Constant Field Values
      • DEFAULT_ACCOUNT_EC_KEY_SIZE

        public static final int DEFAULT_ACCOUNT_EC_KEY_SIZE
        The default account key size that will be used if the key algorithm name is EC.
        See Also:
        Constant Field Values
      • contactUrls

        private String[] contactUrls
      • termsOfServiceAgreed

        private boolean termsOfServiceAgreed
      • serverUrl

        private String serverUrl
      • stagingServerUrl

        private String stagingServerUrl
      • keyAlgorithmName

        private String keyAlgorithmName
      • keySize

        private int keySize
      • algHeader

        private String algHeader
      • signatureAlgorithm

        private String signatureAlgorithm
    • Constructor Detail

      • Builder

        Builder()
        Construct a new uninitialized instance.
    • Method Detail

      • setContactUrls

        public AcmeAccount.Builder setContactUrls​(String[] contactUrls)
        Set the contact URLs.
        Parameters:
        contactUrls - the contact URLs (must not be null)
        Returns:
        this builder instance
      • setTermsOfServiceAgreed

        public AcmeAccount.Builder setTermsOfServiceAgreed​(boolean termsOfServiceAgreed)
        Set if the terms of service of the ACME server have been agreed to.
        Parameters:
        termsOfServiceAgreed - whether or not the ACME server's terms of service have been agreed to
        Returns:
        this builder instance
      • setServerUrl

        public AcmeAccount.Builder setServerUrl​(String serverUrl)
        Set the URL of the ACME server endpoint.
        Parameters:
        serverUrl - the ACME server endpoint URL (must not be null)
        Returns:
        this builder instance
      • setStagingServerUrl

        public AcmeAccount.Builder setStagingServerUrl​(String stagingServerUrl)
        Set the URL of the ACME staging server endpoint.
        Parameters:
        stagingServerUrl - the ACME staging server endpoint URL (must not be null)
        Returns:
        this builder instance
      • setKeyAlgorithmName

        public AcmeAccount.Builder setKeyAlgorithmName​(String keyAlgorithmName)
        Set the key algorithm name to use when generating the account key pair.
        Parameters:
        keyAlgorithmName - the key algorithm name to use when generating the account key pair (must not be null)
        Returns:
        this builder instance
      • setKeySize

        public AcmeAccount.Builder setKeySize​(int keySize)
        Set the key size to use when generating the account key pair.
        Parameters:
        keySize - the key size to use when generating the account key pair
        Returns:
        this builder instance
      • setDn

        public AcmeAccount.Builder setDn​(X500Principal dn)
        Set the DN to use when generating the account key pair.
        Parameters:
        dn - the DN to use as both the subject DN and the issuer DN (must not be null)
        Returns:
        this builder instance
      • setKey

        public AcmeAccount.Builder setKey​(X509Certificate certificate,
                                          PrivateKey privateKey)
        Set the account key pair.
        Parameters:
        certificate - the certificate (must not be null)
        privateKey - the key (must not be null)
        Returns:
        this builder instance