Class CertPublisher

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public abstract class CertPublisher
    extends java.lang.Object
    implements java.io.Closeable
    Defines how to publish the certificates and CRLs. All CertPublisher classes must extend this class.
    Since:
    2.0.0
    Author:
    Lijun Liao (xipki)
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CertPublisher()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean caAdded​(org.xipki.security.X509Cert caCert)
      Publishes the certificate of the CA.
      abstract boolean caRevoked​(org.xipki.security.X509Cert caCert, org.xipki.security.CertRevocationInfo revInfo)
      Publishes the revocation of a CA.
      abstract boolean caUnrevoked​(org.xipki.security.X509Cert caCert)
      Publishes the unrevocation of a CA.
      abstract boolean certificateAdded​(CertificateInfo certInfo)
      Publishes a certificate.
      abstract boolean certificateRemoved​(org.xipki.security.X509Cert caCert, CertWithDbId cert)
      Publishes the remove of a certificate.
      abstract boolean certificateRevoked​(org.xipki.security.X509Cert caCert, CertWithDbId cert, java.lang.String certprofile, org.xipki.security.CertRevocationInfo revInfo)
      Publishes the revocation of a certificate.
      abstract boolean certificateUnrevoked​(org.xipki.security.X509Cert caCert, CertWithDbId cert)
      Publishes the unrevocation of a certificate.
      void close()  
      abstract boolean crlAdded​(org.xipki.security.X509Cert caCert, org.bouncycastle.cert.X509CRLHolder crl)
      Publishes a CRL.
      abstract void initialize​(java.lang.String conf, org.xipki.password.PasswordResolver passwordResolver, java.util.Map<java.lang.String,​org.xipki.datasource.DataSourceWrapper> datasourceConfs)
      Initializes me.
      abstract boolean isHealthy()  
      abstract boolean publishsGoodCert()  
      • Methods inherited from class java.lang.Object

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

      • CertPublisher

        protected CertPublisher()
    • Method Detail

      • initialize

        public abstract void initialize​(java.lang.String conf,
                                        org.xipki.password.PasswordResolver passwordResolver,
                                        java.util.Map<java.lang.String,​org.xipki.datasource.DataSourceWrapper> datasourceConfs)
                                 throws CertPublisherException
        Initializes me.
        Parameters:
        conf - Configuration. Could be null.
        passwordResolver - Password resolver. Could be null.
        datasourceConfs - Datasource name to configuration map. Must not be null.
        Throws:
        CertPublisherException - If error during the initialization occurs.
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • publishsGoodCert

        public abstract boolean publishsGoodCert()
      • caAdded

        public abstract boolean caAdded​(org.xipki.security.X509Cert caCert)
        Publishes the certificate of the CA.
        Parameters:
        caCert - CA certificate to be published. Must not be null.
        Returns:
        whether the CA is published.
      • certificateAdded

        public abstract boolean certificateAdded​(CertificateInfo certInfo)
        Publishes a certificate.
        Parameters:
        certInfo - Certificate to be published.
        Returns:
        whether the certificate is published.
      • certificateRevoked

        public abstract boolean certificateRevoked​(org.xipki.security.X509Cert caCert,
                                                   CertWithDbId cert,
                                                   java.lang.String certprofile,
                                                   org.xipki.security.CertRevocationInfo revInfo)
        Publishes the revocation of a certificate.
        Parameters:
        caCert - CA certificate. Must not be null.
        cert - Target certificate. Must not be null.
        certprofile - Certificate profile. Could be null.
        revInfo - Revocation information. Must not be null.
        Returns:
        whether the revocation is published.
      • certificateUnrevoked

        public abstract boolean certificateUnrevoked​(org.xipki.security.X509Cert caCert,
                                                     CertWithDbId cert)
        Publishes the unrevocation of a certificate.
        Parameters:
        caCert - CA certificate. Must not be null.
        cert - Target certificate. Must not be null.
        Returns:
        whether the unrevocation is published.
      • certificateRemoved

        public abstract boolean certificateRemoved​(org.xipki.security.X509Cert caCert,
                                                   CertWithDbId cert)
        Publishes the remove of a certificate.
        Parameters:
        caCert - CA certificate. Must not be null.
        cert - Target certificate. Must not be null.
        Returns:
        whether the remove is published.
      • crlAdded

        public abstract boolean crlAdded​(org.xipki.security.X509Cert caCert,
                                         org.bouncycastle.cert.X509CRLHolder crl)
        Publishes a CRL.
        Parameters:
        caCert - CA certificate. Must not be null.
        crl - CRL to be published. Must not be null.
        Returns:
        whether the CRL is published.
      • caRevoked

        public abstract boolean caRevoked​(org.xipki.security.X509Cert caCert,
                                          org.xipki.security.CertRevocationInfo revInfo)
        Publishes the revocation of a CA.
        Parameters:
        caCert - CA certificate. Must not be null.
        revInfo - Revocation information. Must not be null.
        Returns:
        whether the CA revocation is published.
      • caUnrevoked

        public abstract boolean caUnrevoked​(org.xipki.security.X509Cert caCert)
        Publishes the unrevocation of a CA.
        Parameters:
        caCert - CA certificate. Must not be null.
        Returns:
        whether the CA unrevocation is published.
      • isHealthy

        public abstract boolean isHealthy()