Class LetsEncryptAcmeService

    • Constructor Detail

      • LetsEncryptAcmeService

        public LetsEncryptAcmeService​(@NotNull
                                      ServerSettings serverSettings)
    • Method Detail

      • triggerHttp01Challenge

        public void triggerHttp01Challenge​(@NotNull
                                           KeyPair keyPair,
                                           @NotNull
                                           URL orderUrl)
                                    throws AcmeServiceException
        Description copied from interface: AcmeService
        Triggers the HTTP-01 challenge for provided key pair's order. On success, the key pair is considered authorized.
        Specified by:
        triggerHttp01Challenge in interface AcmeService
        Parameters:
        keyPair - key pair representing ACME account
        orderUrl - 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: AcmeService
        Receive signed certificate with authorized key pair
        Specified by:
        getSignedCertificate in interface AcmeService
        Parameters:
        keyPair - authorized key pair
        orderUrl - 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 AcmeServiceException
        Description copied from interface: AcmeService
        Revokes certificate using ACME account that ordered it
        Specified by:
        revokeCertificate in interface AcmeService
        Parameters:
        keyPair - key pair of account that ordered certificate
        certificate - certificate to revoke
        Throws:
        AcmeServiceException - on unauthorized/incorrect key pair or if revocation has failed
      • getDomain

        @NotNull
        public String getDomain​(@NotNull
                                String url)
        Receives domain for certificate order.
        Parameters:
        url -
        Returns:
        domain