Class CmpClientImpl

    • Constructor Detail

      • CmpClientImpl

        public CmpClientImpl()
    • Method Detail

      • setSecurityFactory

        public void setSecurityFactory​(org.xipki.security.SecurityFactory securityFactory)
      • setConfFile

        public void setConfFile​(String confFile)
      • enrollCert

        public EnrollCertResult enrollCert​(String caName,
                                           Requestor requestor,
                                           org.bouncycastle.asn1.pkcs.CertificationRequest csr,
                                           String profile,
                                           Instant notBefore,
                                           Instant notAfter,
                                           org.xipki.util.ReqRespDebug debug)
                                    throws CmpClientException,
                                           PkiErrorException
        Description copied from interface: CmpClient
        Enrolls a certificate.
        Specified by:
        enrollCert in interface CmpClient
        Parameters:
        caName - CA name. Must not be null.
        requestor - Requestor, the actor which requests the operation. Must not be null.
        csr - CSR. Must not benull.
        profile - Certificate profile name. Must not benull.
        notBefore - NotBefore. Could be null.
        notAfter - NotAfter. Could be null.
        debug - Request/response debug control. Could be null.
        Returns:
        the enrolling result.
        Throws:
        CmpClientException - if client error occurs.
        PkiErrorException - if the response returns none-success status.
      • revokeCert

        public CertIdOrError revokeCert​(String caName,
                                        Requestor requestor,
                                        org.xipki.security.X509Cert issuerCert,
                                        org.xipki.security.X509Cert cert,
                                        int reason,
                                        Instant invalidityDate,
                                        org.xipki.util.ReqRespDebug debug)
                                 throws CmpClientException,
                                        PkiErrorException
        Description copied from interface: CmpClient
        Revokes a certificate.
        Specified by:
        revokeCert in interface CmpClient
        Parameters:
        caName - CA name. Must not be null.
        requestor - Requestor, the actor which requests the operation. Must not be null.
        issuerCert - Issuer's certificate. Must not be null.
        cert - Target certificate. Must not be null.
        reason - Revocation reason.
        invalidityDate - Invalidity time. Could be null.
        debug - Request/response debug control. Could be null.
        Returns:
        the revocation result.
        Throws:
        CmpClientException - if client error occurs.
        PkiErrorException - if the response returns none-success status.
      • revokeCert

        public CertIdOrError revokeCert​(String caName,
                                        Requestor requestor,
                                        org.xipki.security.X509Cert issuerCert,
                                        BigInteger serial,
                                        int reason,
                                        Instant invalidityDate,
                                        org.xipki.util.ReqRespDebug debug)
                                 throws CmpClientException,
                                        PkiErrorException
        Description copied from interface: CmpClient
        Revokes a certificate.
        Specified by:
        revokeCert in interface CmpClient
        Parameters:
        caName - CA name. Must not be null.
        requestor - Requestor, the actor which requests the operation. Must not be null.
        issuerCert - Issuer's certificate. Must not be null.
        serial - Serial number of the target certificate. Must not be null.
        reason - Revocation reason.
        invalidityDate - Invalidity time. Could be null.
        debug - Request/response debug control. Could be null.
        Returns:
        the revocation result.
        Throws:
        CmpClientException - if client error occurs.
        PkiErrorException - if the response returns none-success status.
      • downloadCrl

        public org.bouncycastle.cert.X509CRLHolder downloadCrl​(String caName,
                                                               org.xipki.util.ReqRespDebug debug)
                                                        throws CmpClientException,
                                                               PkiErrorException
        Description copied from interface: CmpClient
        Downloads the current CRL.
        Specified by:
        downloadCrl in interface CmpClient
        Parameters:
        caName - CA name. Must not be null.
        debug - Request/response debug control. Could be null.
        Returns:
        the X509 CRL. Must not be null.
        Throws:
        CmpClientException - if client error occurs.
        PkiErrorException - if the response returns none-success status.
      • unsuspendCert

        public CertIdOrError unsuspendCert​(String caName,
                                           Requestor requestor,
                                           org.xipki.security.X509Cert issuerCert,
                                           org.xipki.security.X509Cert cert,
                                           org.xipki.util.ReqRespDebug debug)
                                    throws CmpClientException,
                                           PkiErrorException
        Description copied from interface: CmpClient
        Unsuspends certificates.
        Specified by:
        unsuspendCert in interface CmpClient
        Parameters:
        caName - CA name. Must not be null.
        requestor - Requestor, the actor which requests the operation. Must not be null.
        issuerCert - Issuer's certificate. Must not be null.
        cert - Target certificate. Must not be null.
        debug - Request/response debug control. Could be null.
        Returns:
        result of the unrevocation.
        Throws:
        CmpClientException - if client error occurs.
        PkiErrorException - if the response returns none-success status.
      • unsuspendCert

        public CertIdOrError unsuspendCert​(String caName,
                                           Requestor requestor,
                                           org.xipki.security.X509Cert issuerCert,
                                           BigInteger serial,
                                           org.xipki.util.ReqRespDebug debug)
                                    throws CmpClientException,
                                           PkiErrorException
        Description copied from interface: CmpClient
        Unsuspends a certificate.
        Specified by:
        unsuspendCert in interface CmpClient
        Parameters:
        caName - CA name. Must not be null.
        requestor - Requestor, the actor which requests the operation. Must not be null.
        issuerCert - Issuer's certificate. Must not be null.
        serial - Serial number of the certificate. Must not be null.
        debug - Request/response debug control. Could be null.
        Returns:
        result of action.
        Throws:
        CmpClientException - if client error occurs.
        PkiErrorException - if the response returns none-success status.
      • caCert

        public org.xipki.security.X509Cert caCert​(String caName,
                                                  org.xipki.util.ReqRespDebug debug)
                                           throws CmpClientException,
                                                  PkiErrorException
        Description copied from interface: CmpClient
        Returns the CA certificate.
        Specified by:
        caCert in interface CmpClient
        Parameters:
        caName - the CA name
        debug - Request/response debug control. Could be null.
        Returns:
        the CA certificate
        Throws:
        CmpClientException - if client error occurs.
        PkiErrorException - if the response returns none-success status.
      • getDhPopPeerCertificates

        public List<org.xipki.security.X509Cert> getDhPopPeerCertificates()
        Description copied from interface: CmpClient
        Returns the certificates held by CA for the DH KeyAgreement.
        Specified by:
        getDhPopPeerCertificates in interface CmpClient
        Returns:
        the certificates held by CA for the DH KeyAgreement,