Class LetsEncryptAcmeService
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.ssl.acme.LetsEncryptAcmeService
-
- All Implemented Interfaces:
AcmeService,TeamCityExtension
public class LetsEncryptAcmeService extends Object implements AcmeService
-
-
Constructor Summary
Constructors Constructor Description LetsEncryptAcmeService(ServerSettings serverSettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDomain(String url)Receives domain for certificate order.Pair<Collection<Certificate>,KeyPair>getSignedCertificate(KeyPair keyPair, URL orderUrl)Receive signed certificate with authorized key pairStringgetTermsOfService()Returns terms of service.AcmeOrderinitializeHttp01Challenge(KeyPair keyPair)Initializes HTTP-01 challenge.KeyPairregisterAccount()Register new ACME accountvoidrevokeCertificate(KeyPair keyPair, Certificate certificate)Revokes certificate using ACME account that ordered itvoidtriggerHttp01Challenge(KeyPair keyPair, URL orderUrl)Triggers the HTTP-01 challenge for provided key pair's order.
-
-
-
Constructor Detail
-
LetsEncryptAcmeService
public LetsEncryptAcmeService(@NotNull ServerSettings serverSettings)
-
-
Method Detail
-
registerAccount
public KeyPair registerAccount() throws AcmeServiceException
Description copied from interface:AcmeServiceRegister new ACME account- Specified by:
registerAccountin interfaceAcmeService- Returns:
- authenticated
KeyPair, which can be used for issuing certificates - Throws:
AcmeServiceException- on failed registration or invalid key pair
-
initializeHttp01Challenge
public AcmeOrder initializeHttp01Challenge(@NotNull KeyPair keyPair) throws AcmeServiceException
Description copied from interface:AcmeServiceInitializes HTTP-01 challenge. Returns required file name and file contents.- Specified by:
initializeHttp01Challengein interfaceAcmeService- Parameters:
keyPair- key pair which will be used for order- Returns:
AcmeOrderwith required file name, required file contents and order URL- Throws:
AcmeServiceException- on invalid key pair or networking errors
-
triggerHttp01Challenge
public void triggerHttp01Challenge(@NotNull KeyPair keyPair, @NotNull URL orderUrl) throws AcmeServiceExceptionDescription copied from interface:AcmeServiceTriggers the HTTP-01 challenge for provided key pair's order. On success, the key pair is considered authorized.- Specified by:
triggerHttp01Challengein interfaceAcmeService- Parameters:
keyPair- key pair representing ACME accountorderUrl- URL of order- Throws:
AcmeServiceException- on failed confirmation, on invalid key pair, or when the order do not have initialized challenge
-
getSignedCertificate
public Pair<Collection<Certificate>,KeyPair> getSignedCertificate(@NotNull KeyPair keyPair, @NotNull URL orderUrl) throws AcmeServiceException
Description copied from interface:AcmeServiceReceive signed certificate with authorized key pair- Specified by:
getSignedCertificatein interfaceAcmeService- Parameters:
keyPair- authorized key pairorderUrl- URL of order- Returns:
- pair of signed certificate chain in collection and domain key pair. Please note that it's not equal to ACME account key pair. First certificate in this chain must be end-entity.
- Throws:
AcmeServiceException- if key pair is not authorized in ACME server, or if certificate fetch has failed
-
revokeCertificate
public void revokeCertificate(@NotNull KeyPair keyPair, @NotNull Certificate certificate) throws AcmeServiceExceptionDescription copied from interface:AcmeServiceRevokes certificate using ACME account that ordered it- Specified by:
revokeCertificatein interfaceAcmeService- Parameters:
keyPair- key pair of account that ordered certificatecertificate- certificate to revoke- Throws:
AcmeServiceException- on unauthorized/incorrect key pair or if revocation has failed
-
getTermsOfService
@Nullable public String getTermsOfService() throws AcmeServiceException
Description copied from interface:AcmeServiceReturns terms of service.- Specified by:
getTermsOfServicein interfaceAcmeService- Returns:
- string with terms of service
- Throws:
AcmeServiceException- on connection failures
-
-