Class Http01ChallengeFileServer


  • public class Http01ChallengeFileServer
    extends Object
    A simple HTTP server used to serve HTTP-01 challenge files for Let's Encrypt. Quite same as SimpleHttpServerBase HTTP-01 challenge can only be done on port 80, so we use sockets to serve files without TC deployment on port 80. See https://letsencrypt.org/docs/challenge-types/ for details
    • Constructor Detail

      • Http01ChallengeFileServer

        public Http01ChallengeFileServer()
    • Method Detail

      • startHttp01ChallengeServer

        public void startHttp01ChallengeServer​(@NotNull
                                               Collection<AcmeAuthorization> authorizations)
                                        throws AcmeServiceException
        Opens socket, which serves given challenge files at .well-known/acme-challenge/%challengeFileName% path
        Parameters:
        authorizations - list of challenge files
        Throws:
        AcmeServiceException - on socket opening failures
      • stopHttp01ChallengeServer

        public void stopHttp01ChallengeServer()
        Stops challenge file serving
      • setPort

        public void setPort​(int newPort)
        Set new port. For testing purposes.
        Parameters:
        newPort -