Search in sources :

Example 1 with XmlRevocationValuesType

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);
}
Also used : XmlCRLValuesType(xades4j.xml.bind.xades.XmlCRLValuesType) RevocationValuesData(xades4j.properties.data.RevocationValuesData) XmlRevocationValuesType(xades4j.xml.bind.xades.XmlRevocationValuesType) XmlEncapsulatedPKIDataType(xades4j.xml.bind.xades.XmlEncapsulatedPKIDataType) List(java.util.List)

Aggregations

List (java.util.List)1 RevocationValuesData (xades4j.properties.data.RevocationValuesData)1 XmlCRLValuesType (xades4j.xml.bind.xades.XmlCRLValuesType)1 XmlEncapsulatedPKIDataType (xades4j.xml.bind.xades.XmlEncapsulatedPKIDataType)1 XmlRevocationValuesType (xades4j.xml.bind.xades.XmlRevocationValuesType)1