use of xades4j.xml.bind.xades.XmlCertificateValuesType in project xades4j by luisgoncalves.
the class ToXmlCertificateValuesConverter method convertIntoObjectTree.
@Override
public void convertIntoObjectTree(PropertyDataObject propData, XmlUnsignedPropertiesType xmlProps, Document doc) {
Collection<byte[]> certValues = ((CertificateValuesData) propData).getData();
XmlCertificateValuesType xmlCertValues = new XmlCertificateValuesType();
List xmlCerts = xmlCertValues.getEncapsulatedX509CertificateOrOtherCertificate();
for (byte[] encodCer : certValues) {
XmlEncapsulatedPKIDataType xmlEncodCert = new XmlEncapsulatedPKIDataType();
xmlEncodCert.setValue(encodCer);
xmlCerts.add(xmlEncodCert);
}
xmlProps.getUnsignedSignatureProperties().setCertificateValues(xmlCertValues);
}
Aggregations