Class AcmeAccount.Builder
java.lang.Object
org.wildfly.security.x500.cert.acme.AcmeAccount.Builder
- Enclosing class:
- AcmeAccount
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default account key size that will be used if the key algorithm name is EC.static final StringThe default account key algorithm name.static final intThe default account key size that will be used if the key algorithm name is not EC. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an ACME account.setContactUrls(String[] contactUrls) Set the contact URLs.setDn(X500Principal dn) Set the DN to use when generating the account key pair.setKey(X509Certificate certificate, PrivateKey privateKey) Set the account key pair.setKeyAlgorithmName(String keyAlgorithmName) Set the key algorithm name to use when generating the account key pair.setKeySize(int keySize) Set the key size to use when generating the account key pair.setServerUrl(String serverUrl) Set the URL of the ACME server endpoint.setStagingServerUrl(String stagingServerUrl) Set the URL of the ACME staging server endpoint.setTermsOfServiceAgreed(boolean termsOfServiceAgreed) Set if the terms of service of the ACME server have been agreed to.
-
Field Details
-
DEFAULT_ACCOUNT_KEY_ALGORITHM_NAME
The default account key algorithm name.- See Also:
-
DEFAULT_ACCOUNT_KEY_SIZE
public static final int DEFAULT_ACCOUNT_KEY_SIZEThe default account key size that will be used if the key algorithm name is not EC.- See Also:
-
DEFAULT_ACCOUNT_EC_KEY_SIZE
public static final int DEFAULT_ACCOUNT_EC_KEY_SIZEThe default account key size that will be used if the key algorithm name is EC.- See Also:
-
-
Method Details
-
setContactUrls
Set the contact URLs.- Parameters:
contactUrls- the contact URLs (must not benull)- Returns:
- this builder instance
-
setTermsOfServiceAgreed
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
Set the URL of the ACME server endpoint.- Parameters:
serverUrl- the ACME server endpoint URL (must not benull)- Returns:
- this builder instance
-
setStagingServerUrl
Set the URL of the ACME staging server endpoint.- Parameters:
stagingServerUrl- the ACME staging server endpoint URL (must not benull)- Returns:
- this builder instance
-
setKeyAlgorithmName
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 benull)- Returns:
- this builder instance
-
setKeySize
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
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 benull)- Returns:
- this builder instance
-
setKey
Set the account key pair.- Parameters:
certificate- the certificate (must not benull)privateKey- the key (must not benull)- Returns:
- this builder instance
-
build
Create an ACME account.- Returns:
- the newly created ACME account
- Throws:
IllegalArgumentException- if a required builder parameter is missing or invalid
-