Class BaseCmpResponder

  • Direct Known Subclasses:
    CmpResponder

    public abstract class BaseCmpResponder
    extends Object
    Base CMP responder.
    Since:
    6.0.0
    Author:
    Lijun Liao (xipki)
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseCmpResponder​(CmpControl cmpControl, org.xipki.ca.sdk.SdkClient sdk, org.xipki.security.SecurityFactory securityFactory, org.xipki.ca.gateway.CaNameSigners signers, org.xipki.ca.gateway.RequestorAuthenticator authenticator, org.xipki.ca.gateway.PopControl popControl)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected static void addErrCertResp​(Map<Integer,​org.bouncycastle.asn1.cmp.CertResponse> resps, int index, org.bouncycastle.asn1.ASN1Integer certReqId, int pkiFailureInfo, String pkiStatusText)  
      protected static org.bouncycastle.asn1.cmp.CertRepMessage buildErrCertResp​(org.bouncycastle.asn1.ASN1Integer certReqId, int pkiFailureInfo, String pkiStatusText)  
      protected static org.bouncycastle.asn1.cmp.PKIBody buildErrorMsgPkiBody​(org.bouncycastle.asn1.cmp.PKIStatus pkiStatus, int failureInfo, String statusMessage)  
      protected void checkPermission​(org.xipki.ca.gateway.Requestor requestor, org.xipki.ca.gateway.Requestor.Permission requiredPermission)  
      protected abstract org.bouncycastle.asn1.cmp.PKIBody cmpEnrollCert​(String caName, String dfltCertprofileName, boolean groupEnroll, org.bouncycastle.asn1.cmp.PKIMessage request, org.bouncycastle.asn1.cmp.PKIHeaderBuilder respHeader, org.bouncycastle.asn1.cmp.PKIHeader reqHeader, org.bouncycastle.asn1.cmp.PKIBody reqBody, org.xipki.ca.gateway.Requestor requestor, org.bouncycastle.asn1.ASN1OctetString tid, org.xipki.audit.AuditEvent event)  
      protected org.bouncycastle.asn1.cmp.PKIBody cmpGeneralMsg​(String caName, org.bouncycastle.asn1.cmp.PKIBody reqBody, org.xipki.audit.AuditEvent event)  
      protected abstract org.bouncycastle.asn1.cmp.PKIBody cmpUnRevokeCertificates​(String caName, org.bouncycastle.asn1.cmp.PKIMessage request, org.bouncycastle.asn1.cmp.PKIHeaderBuilder respHeader, org.bouncycastle.asn1.cmp.PKIHeader reqHeader, org.bouncycastle.asn1.cmp.PKIBody reqBody, org.xipki.ca.gateway.Requestor requestor, org.xipki.audit.AuditEvent event)  
      protected abstract org.bouncycastle.asn1.cmp.PKIBody confirmCertificates​(String caName, org.bouncycastle.asn1.ASN1OctetString transactionId, org.bouncycastle.asn1.cmp.CertConfirmContent certConf)  
      protected static org.bouncycastle.asn1.cmp.PKIStatusInfo generateRejectionStatus​(Integer info, String errorMessage)  
      protected static org.bouncycastle.asn1.cmp.PKIStatusInfo generateRejectionStatus​(org.bouncycastle.asn1.cmp.PKIStatus status, Integer info, String errorMessage)  
      protected static int getPKiFailureInfo​(org.xipki.pki.OperationException ex)  
      protected static org.bouncycastle.asn1.x500.X500Name getX500Name​(org.bouncycastle.asn1.x509.GeneralName name)  
      protected org.bouncycastle.asn1.cmp.CertResponse postProcessCertInfo​(org.bouncycastle.asn1.ASN1Integer certReqId, org.xipki.ca.gateway.Requestor requestor, byte[] cert, byte[] privateKeyinfo)  
      org.bouncycastle.asn1.cmp.PKIMessage processPkiMessage​(String caName, org.bouncycastle.asn1.cmp.PKIMessage pkiMessage, org.xipki.security.X509Cert tlsClientCert, Map<String,​String> parameters, org.xipki.audit.AuditEvent event)  
      protected abstract org.bouncycastle.asn1.cmp.PKIBody revokePendingCertificates​(String caName, org.bouncycastle.asn1.ASN1OctetString transactionId)  
      protected boolean verifyPop​(org.bouncycastle.cert.crmf.CertificateRequestMessage certRequest, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo spki)  
    • Constructor Detail

      • BaseCmpResponder

        protected BaseCmpResponder​(CmpControl cmpControl,
                                   org.xipki.ca.sdk.SdkClient sdk,
                                   org.xipki.security.SecurityFactory securityFactory,
                                   org.xipki.ca.gateway.CaNameSigners signers,
                                   org.xipki.ca.gateway.RequestorAuthenticator authenticator,
                                   org.xipki.ca.gateway.PopControl popControl)
                            throws NoSuchAlgorithmException
        Throws:
        NoSuchAlgorithmException
    • Method Detail

      • cmpEnrollCert

        protected abstract org.bouncycastle.asn1.cmp.PKIBody cmpEnrollCert​(String caName,
                                                                           String dfltCertprofileName,
                                                                           boolean groupEnroll,
                                                                           org.bouncycastle.asn1.cmp.PKIMessage request,
                                                                           org.bouncycastle.asn1.cmp.PKIHeaderBuilder respHeader,
                                                                           org.bouncycastle.asn1.cmp.PKIHeader reqHeader,
                                                                           org.bouncycastle.asn1.cmp.PKIBody reqBody,
                                                                           org.xipki.ca.gateway.Requestor requestor,
                                                                           org.bouncycastle.asn1.ASN1OctetString tid,
                                                                           org.xipki.audit.AuditEvent event)
                                                                    throws org.xipki.util.exception.InsufficientPermissionException,
                                                                           org.xipki.ca.sdk.SdkErrorResponseException
        Throws:
        org.xipki.util.exception.InsufficientPermissionException
        org.xipki.ca.sdk.SdkErrorResponseException
      • cmpUnRevokeCertificates

        protected abstract org.bouncycastle.asn1.cmp.PKIBody cmpUnRevokeCertificates​(String caName,
                                                                                     org.bouncycastle.asn1.cmp.PKIMessage request,
                                                                                     org.bouncycastle.asn1.cmp.PKIHeaderBuilder respHeader,
                                                                                     org.bouncycastle.asn1.cmp.PKIHeader reqHeader,
                                                                                     org.bouncycastle.asn1.cmp.PKIBody reqBody,
                                                                                     org.xipki.ca.gateway.Requestor requestor,
                                                                                     org.xipki.audit.AuditEvent event)
                                                                              throws org.xipki.ca.sdk.SdkErrorResponseException
        Throws:
        org.xipki.ca.sdk.SdkErrorResponseException
      • confirmCertificates

        protected abstract org.bouncycastle.asn1.cmp.PKIBody confirmCertificates​(String caName,
                                                                                 org.bouncycastle.asn1.ASN1OctetString transactionId,
                                                                                 org.bouncycastle.asn1.cmp.CertConfirmContent certConf)
                                                                          throws org.xipki.ca.sdk.SdkErrorResponseException
        Throws:
        org.xipki.ca.sdk.SdkErrorResponseException
      • revokePendingCertificates

        protected abstract org.bouncycastle.asn1.cmp.PKIBody revokePendingCertificates​(String caName,
                                                                                       org.bouncycastle.asn1.ASN1OctetString transactionId)
                                                                                throws org.xipki.ca.sdk.SdkErrorResponseException
        Throws:
        org.xipki.ca.sdk.SdkErrorResponseException
      • getX500Name

        protected static org.bouncycastle.asn1.x500.X500Name getX500Name​(org.bouncycastle.asn1.x509.GeneralName name)
      • processPkiMessage

        public org.bouncycastle.asn1.cmp.PKIMessage processPkiMessage​(String caName,
                                                                      org.bouncycastle.asn1.cmp.PKIMessage pkiMessage,
                                                                      org.xipki.security.X509Cert tlsClientCert,
                                                                      Map<String,​String> parameters,
                                                                      org.xipki.audit.AuditEvent event)
      • generateRejectionStatus

        protected static org.bouncycastle.asn1.cmp.PKIStatusInfo generateRejectionStatus​(Integer info,
                                                                                         String errorMessage)
      • generateRejectionStatus

        protected static org.bouncycastle.asn1.cmp.PKIStatusInfo generateRejectionStatus​(org.bouncycastle.asn1.cmp.PKIStatus status,
                                                                                         Integer info,
                                                                                         String errorMessage)
      • getPKiFailureInfo

        protected static int getPKiFailureInfo​(org.xipki.pki.OperationException ex)
      • checkPermission

        protected void checkPermission​(org.xipki.ca.gateway.Requestor requestor,
                                       org.xipki.ca.gateway.Requestor.Permission requiredPermission)
                                throws org.xipki.util.exception.InsufficientPermissionException
        Throws:
        org.xipki.util.exception.InsufficientPermissionException
      • buildErrorMsgPkiBody

        protected static org.bouncycastle.asn1.cmp.PKIBody buildErrorMsgPkiBody​(org.bouncycastle.asn1.cmp.PKIStatus pkiStatus,
                                                                                int failureInfo,
                                                                                String statusMessage)
      • buildErrCertResp

        protected static org.bouncycastle.asn1.cmp.CertRepMessage buildErrCertResp​(org.bouncycastle.asn1.ASN1Integer certReqId,
                                                                                   int pkiFailureInfo,
                                                                                   String pkiStatusText)
      • addErrCertResp

        protected static void addErrCertResp​(Map<Integer,​org.bouncycastle.asn1.cmp.CertResponse> resps,
                                             int index,
                                             org.bouncycastle.asn1.ASN1Integer certReqId,
                                             int pkiFailureInfo,
                                             String pkiStatusText)
      • verifyPop

        protected boolean verifyPop​(org.bouncycastle.cert.crmf.CertificateRequestMessage certRequest,
                                    org.bouncycastle.asn1.x509.SubjectPublicKeyInfo spki)
      • postProcessCertInfo

        protected org.bouncycastle.asn1.cmp.CertResponse postProcessCertInfo​(org.bouncycastle.asn1.ASN1Integer certReqId,
                                                                             org.xipki.ca.gateway.Requestor requestor,
                                                                             byte[] cert,
                                                                             byte[] privateKeyinfo)
      • cmpGeneralMsg

        protected org.bouncycastle.asn1.cmp.PKIBody cmpGeneralMsg​(String caName,
                                                                  org.bouncycastle.asn1.cmp.PKIBody reqBody,
                                                                  org.xipki.audit.AuditEvent event)
                                                           throws org.xipki.ca.sdk.SdkErrorResponseException
        Throws:
        org.xipki.ca.sdk.SdkErrorResponseException