use of org.xipki.cmp.PkiResponse in project xipki by xipki.
the class X509CmpRequestor method removeCertificate.
public RevokeCertResultType removeCertificate(UnrevokeOrRemoveCertRequest request, RequestResponseDebug debug) throws CmpRequestorException, PkiErrorException {
ParamUtil.requireNonNull("request", request);
PKIMessage reqMessage = buildUnrevokeOrRemoveCertRequest(request, XiSecurityConstants.CMP_CRL_REASON_REMOVE);
PkiResponse response = signAndSend(reqMessage, debug);
return parse(response, request.getRequestEntries());
}
use of org.xipki.cmp.PkiResponse in project xipki by xipki.
the class X509CmpRequestor method revokeCertificate.
// method evaluateCrlResponse
public RevokeCertResultType revokeCertificate(RevokeCertRequest request, RequestResponseDebug debug) throws CmpRequestorException, PkiErrorException {
ParamUtil.requireNonNull("request", request);
PKIMessage reqMessage = buildRevokeCertRequest(request);
PkiResponse response = signAndSend(reqMessage, debug);
return parse(response, request.getRequestEntries());
}
use of org.xipki.cmp.PkiResponse in project xipki by xipki.
the class X509CmpRequestor method downloadCrl.
public X509CRL downloadCrl(BigInteger crlNumber, RequestResponseDebug debug) throws CmpRequestorException, PkiErrorException {
Integer action = null;
PKIMessage request;
if (crlNumber == null) {
ASN1ObjectIdentifier type = CMPObjectIdentifiers.it_currentCRL;
request = buildMessageWithGeneralMsgContent(type, null);
} else {
action = XiSecurityConstants.CMP_ACTION_GET_CRL_WITH_SN;
request = buildMessageWithXipkAction(action, new ASN1Integer(crlNumber));
}
PkiResponse response = signAndSend(request, debug);
return evaluateCrlResponse(response, action);
}
Aggregations