Class LetsEncryptRenewal


  • public class LetsEncryptRenewal
    extends java.lang.Object
    Class used to create or renew the certificate for a domain in the server.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      static longRENEW_PERIOD
      Renewal trial or logging period in milliseconds, 30 minutes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanperformRenew()
      Performs request or renewal of the certificate when it has expired.
      booleanprocessSettingsChanges()
      Updates the renewal processing for the domain when the settings are changed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • RENEW_PERIOD

        public static long RENEW_PERIOD
        Renewal trial or logging period in milliseconds, 30 minutes.
    • Method Detail

      • processSettingsChanges

        public boolean processSettingsChanges()
        Updates the renewal processing for the domain when the settings are changed. This method is not called by the framework and must be called in order to update the instance with changed settings. This is done typically from the ServerAdmin app.
        Returns:
        true for success, false if nothing was changed or server or domain settings are disposed of.
      • performRenew

        public boolean performRenew()
                             throws java.lang.Exception,
                                    java.io.IOException,
                                    java.net.URISyntaxException,
                                    java.security.UnrecoverableKeyException,
                                    java.security.KeyStoreException,
                                    java.security.NoSuchAlgorithmException,
                                    java.security.cert.CertificateException,
                                    PropException
        Performs request or renewal of the certificate when it has expired.
        Returns:
        Flag indicating auto-accept is used and a second request is done when true, false otherwise.
        Throws:
        java.lang.Exception - For ACME problems, actually org.shredzone.acme4j.exception.AcmeException but in order to avoid module dependency to the acme4j package, an Exception is specified here.
        java.io.IOException - For I/O errors.
        java.net.URISyntaxException - If the ToS URI is in error.
        java.security.NoSuchAlgorithmException - If the algorithm used to check the integrity of the keystore cannot be found.
        java.security.cert.CertificateException - If any of the certificates in the keystore could not be loaded.
        java.security.UnrecoverableKeyException - If the key cannot be recovered (e.g. the given password is wrong).
        java.security.KeyStoreException
        PropException