use of xades4j.xml.bind.xades.XmlRevocationValuesType in project xades4j by luisgoncalves.
the class ToXmlRevocationValuesConverter method convertIntoObjectTree.
@Override
public void convertIntoObjectTree(PropertyDataObject propData, XmlUnsignedPropertiesType xmlProps, Document doc) {
Collection<byte[]> crlValues = ((RevocationValuesData) propData).getData();
XmlRevocationValuesType xmlRevocValues = new XmlRevocationValuesType();
XmlCRLValuesType xmlCRLValues = new XmlCRLValuesType();
xmlRevocValues.setCRLValues(xmlCRLValues);
List xmlCRLs = xmlCRLValues.getEncapsulatedCRLValue();
for (byte[] encodCrl : crlValues) {
XmlEncapsulatedPKIDataType xmlEncodCert = new XmlEncapsulatedPKIDataType();
xmlEncodCert.setValue(encodCrl);
xmlCRLs.add(xmlEncodCert);
}
xmlProps.getUnsignedSignatureProperties().setRevocationValues(xmlRevocValues);
}
Aggregations