Class CertPublisher

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public abstract class CertPublisher
    extends Object
    implements 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 Detail

      • CertPublisher

        protected CertPublisher()
    • Method Detail

      • initialize

        public abstract void initialize​(String conf,
                                        org.xipki.password.PasswordResolver passwordResolver,
                                        Map<String,​org.xipki.util.FileOrValue> 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.
      • publishsGoodCert

        public abstract boolean publishsGoodCert()
      • isAsyn

        @Deprecated
        public boolean isAsyn()
        Deprecated.
        Will not be considered.
        Returns:
        whether data will be published asynchronously.
      • 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,
                                                   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()