myPKIStatusInfo.setFailInfo(failInfo.getAsBitString());
}
if (failText != null) {
myPKIStatusInfo.setStatusString(new PKIFreeText(new DERUTF8String(failText)));
}
PKIBody myPKIBody = null;
log.debug("Create error message from requestType: "+requestType);
if (requestType==0 || requestType==2) {
myPKIBody = CmpMessageHelper.createCertRequestRejectBody(myPKIHeader, myPKIStatusInfo, requestId, requestType);
} else {
ErrorMsgContent myErrorContent = new ErrorMsgContent(myPKIStatusInfo);
myPKIBody = new PKIBody(myErrorContent, 23); // 23 = error
}
PKIMessage myPKIMessage = new PKIMessage(myPKIHeader, myPKIBody);
if ((getPbeDigestAlg() != null) && (getPbeMacAlg() != null) && (getPbeKeyId() != null) && (getPbeKey() != null) ) {
responseMessage = CmpMessageHelper.protectPKIMessageWithPBE(myPKIMessage, getPbeKeyId(), getPbeKey(), getPbeDigestAlg(), getPbeMacAlg(), getPbeIterationCount());
} else {