Search in sources :

Example 1 with ScepCaCertRespBytes

use of org.xipki.ca.server.api.ScepCaCertRespBytes in project xipki by xipki.

the class ScepImpl method refreshCa.

private void refreshCa() throws OperationException {
    try {
        X509Ca ca = caManager.getX509Ca(caIdent);
        X509Cert currentCaCert = ca.getCaInfo().getCert();
        if (currentCaCert.equals(caCert)) {
            return;
        }
        caCert = currentCaCert;
        caCertRespBytes = new ScepCaCertRespBytes(currentCaCert.getCert(), responderCert);
    } catch (CaMgmtException | CertificateException | CMSException ex) {
        throw new OperationException(ErrorCode.SYSTEM_FAILURE, ex.getMessage());
    }
}
Also used : ScepCaCertRespBytes(org.xipki.ca.server.api.ScepCaCertRespBytes) CaMgmtException(org.xipki.ca.server.mgmt.api.CaMgmtException) X509Cert(org.xipki.security.X509Cert) X509Ca(org.xipki.ca.server.impl.X509Ca) CertificateException(java.security.cert.CertificateException) OperationException(org.xipki.ca.api.OperationException) CMSException(org.bouncycastle.cms.CMSException)

Aggregations

CertificateException (java.security.cert.CertificateException)1 CMSException (org.bouncycastle.cms.CMSException)1 OperationException (org.xipki.ca.api.OperationException)1 ScepCaCertRespBytes (org.xipki.ca.server.api.ScepCaCertRespBytes)1 X509Ca (org.xipki.ca.server.impl.X509Ca)1 CaMgmtException (org.xipki.ca.server.mgmt.api.CaMgmtException)1 X509Cert (org.xipki.security.X509Cert)1