public static InfoTypeAndValue getImplictConfirmGeneralInfo() { return new InfoTypeAndValue(CMPObjectIdentifiers.it_implicitConfirm, DERNull.INSTANCE); }
public static CmpUtf8Pairs extract(final InfoTypeAndValue[] regInfos) { if (regInfos == null) { return null; } for (InfoTypeAndValue regInfo : regInfos) { if (CMPObjectIdentifiers.regInfo_utf8Pairs.equals(regInfo.getInfoType())) { String regInfoValue = ((ASN1String) regInfo.getInfoValue()).getString(); return new CmpUtf8Pairs(regInfoValue); } } return null; }
public InfoTypeAndValue[] toInfoTypeAndValueArray() { InfoTypeAndValue[] result = new InfoTypeAndValue[content.size()]; for (int i = 0; i != result.length; i++) { result[i] = InfoTypeAndValue.getInstance(content.getObjectAt(i)); } return result; }
if (itvs != null && itvs.length > 0) { for (InfoTypeAndValue entry : itvs) { String itvType = entry.getInfoType().getId(); if (KNOWN_GENMSG_IDS.contains(itvType)) { itv = entry; ASN1ObjectIdentifier infoType = itv.getInfoType(); CertificateList crl = ca.getBcCurrentCrl(); if (itv.getInfoValue() == null) { // as defined in RFC 4210 crl = ca.getBcCurrentCrl(); } else { ASN1Integer crlNumber = ASN1Integer.getInstance(itv.getInfoValue()); crl = ca.getBcCrl(crlNumber.getPositiveValue()); itvResp = new InfoTypeAndValue(infoType, crl); } else if (ObjectIdentifiers.id_xipki_cmp_cmpGenmsg.equals(infoType)) { ASN1Encodable asn1 = itv.getInfoValue(); ASN1Integer asn1Code = null; ASN1Encodable reqValue = null; itvResp = new InfoTypeAndValue(infoType, new DERSequence(vec)); } else if (ObjectIdentifiers.id_xipki_cmp_cacerts.equals(infoType)) { event.addEventType(CaAuditConstants.TYPE_CMP_genm_cacerts); CMPCertificate caCert = ca.getCaInfo().getCertInCmpFormat(); itvResp = new InfoTypeAndValue(infoType, new DERSequence(caCert));
public static boolean isImplictConfirm(PKIHeader header) { Args.notNull(header, "header"); InfoTypeAndValue[] regInfos = header.getGeneralInfo(); if (regInfos != null) { for (InfoTypeAndValue regInfo : regInfos) { if (CMPObjectIdentifiers.it_implicitConfirm.equals(regInfo.getInfoType())) { return true; } } } return false; }
public static boolean isImplictConfirm(PKIHeader header) { ParamUtil.requireNonNull("header", header); InfoTypeAndValue[] regInfos = header.getGeneralInfo(); if (regInfos != null) { for (InfoTypeAndValue regInfo : regInfos) { if (CMPObjectIdentifiers.it_implicitConfirm.equals(regInfo.getInfoType())) { return true; } } } return false; }
public static InfoTypeAndValue getImplictConfirmGeneralInfo() { return new InfoTypeAndValue(CMPObjectIdentifiers.it_implicitConfirm, DERNull.INSTANCE); }
public static CmpUtf8Pairs extract(InfoTypeAndValue[] regInfos) { if (regInfos != null) { for (InfoTypeAndValue regInfo : regInfos) { if (CMPObjectIdentifiers.regInfo_utf8Pairs.equals(regInfo.getInfoType())) { String regInfoValue = ((ASN1String) regInfo.getInfoValue()).getString(); return new CmpUtf8Pairs(regInfoValue); } } } return null; }
public InfoTypeAndValue[] toInfoTypeAndValueArray() { InfoTypeAndValue[] result = new InfoTypeAndValue[content.size()]; for (int i = 0; i != result.length; i++) { result[i] = InfoTypeAndValue.getInstance(content.getObjectAt(i)); } return result; }
public static boolean isImplictConfirm(final PKIHeader header) { ParamUtil.requireNonNull("header", header); InfoTypeAndValue[] regInfos = header.getGeneralInfo(); if (regInfos == null) { return false; } for (InfoTypeAndValue regInfo : regInfos) { if (CMPObjectIdentifiers.it_implicitConfirm.equals(regInfo.getInfoType())) { return true; } } return false; }
public static InfoTypeAndValue getImplictConfirmGeneralInfo() { return new InfoTypeAndValue(CMPObjectIdentifiers.it_implicitConfirm, DERNull.INSTANCE); }
public static CmpUtf8Pairs extract(InfoTypeAndValue[] regInfos) { if (regInfos != null) { for (InfoTypeAndValue regInfo : regInfos) { if (CMPObjectIdentifiers.regInfo_utf8Pairs.equals(regInfo.getInfoType())) { String regInfoValue = ((ASN1String) regInfo.getInfoValue()).getString(); return new CmpUtf8Pairs(regInfoValue); } } } return null; }
public InfoTypeAndValue[] toInfoTypeAndValueArray() { InfoTypeAndValue[] result = new InfoTypeAndValue[content.size()]; for (int i = 0; i != result.length; i++) { result[i] = InfoTypeAndValue.getInstance(content.getObjectAt(i)); } return result; }
if (additionalGeneralInfos != null) { for (InfoTypeAndValue itv : additionalGeneralInfos) { ASN1ObjectIdentifier type = itv.getInfoType(); if (CMPObjectIdentifiers.it_implicitConfirm.equals(type)) { throw new IllegalArgumentException(
public static InfoTypeAndValue getInstance(Object o) { if (o instanceof InfoTypeAndValue) { return (InfoTypeAndValue)o; } if (o != null) { return new InfoTypeAndValue(ASN1Sequence.getInstance(o)); } return null; }
private ASN1Encodable extractGeneralRepContent(PKIMessage response, String expectedType) throws Exception { PKIBody respBody = response.getBody(); int bodyType = respBody.getType(); if (PKIBody.TYPE_ERROR == bodyType) { ErrorMsgContent content = ErrorMsgContent.getInstance(respBody.getContent()); throw new Exception("Server returned PKIStatus: " + buildText(content.getPKIStatusInfo())); } else if (PKIBody.TYPE_GEN_REP != bodyType) { throw new Exception(String.format("unknown PKI body type %s instead the expected [%s, %s]", bodyType, PKIBody.TYPE_GEN_REP, PKIBody.TYPE_ERROR)); } GenRepContent genRep = GenRepContent.getInstance(respBody.getContent()); InfoTypeAndValue[] itvs = genRep.toInfoTypeAndValueArray(); InfoTypeAndValue itv = null; if (itvs != null && itvs.length > 0) { for (InfoTypeAndValue entry : itvs) { if (expectedType.equals(entry.getInfoType().getId())) { itv = entry; break; } } } if (itv == null) { throw new Exception("the response does not contain InfoTypeAndValue " + expectedType); } return itv.getInfoValue(); } // method extractGeneralRepContent
public InfoTypeAndValue[] toInfoTypeAndValueArray() { InfoTypeAndValue[] result = new InfoTypeAndValue[content.size()]; for (int i = 0; i != result.length; i++) { result[i] = InfoTypeAndValue.getInstance(content.getObjectAt(i)); } return result; }
public static InfoTypeAndValue getInstance(Object o) { if (o instanceof InfoTypeAndValue) { return (InfoTypeAndValue)o; } if (o != null) { return new InfoTypeAndValue(ASN1Sequence.getInstance(o)); } return null; }
if (itvs != null && itvs.length > 0) { for (InfoTypeAndValue m : itvs) { if (expectedType.equals(m.getInfoType())) { itv = m; break; ASN1Encodable certListAsn1Object = (xipkiAction == null) ? itv.getInfoValue() : extractXiActionContent(itv.getInfoValue(), xipkiAction);
public InfoTypeAndValue[] getGeneralInfo() { if (generalInfo == null) { return null; } InfoTypeAndValue[] results = new InfoTypeAndValue[generalInfo.size()]; for (int i = 0; i < results.length; i++) { results[i] = InfoTypeAndValue.getInstance(generalInfo.getObjectAt(i)); } return results; }