Search in sources :

Example 1 with CertificateValuesData

use of xades4j.properties.data.CertificateValuesData 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);
}
Also used : XmlEncapsulatedPKIDataType(xades4j.xml.bind.xades.XmlEncapsulatedPKIDataType) CertificateValuesData(xades4j.properties.data.CertificateValuesData) List(java.util.List) XmlCertificateValuesType(xades4j.xml.bind.xades.XmlCertificateValuesType)

Aggregations

List (java.util.List)1 CertificateValuesData (xades4j.properties.data.CertificateValuesData)1 XmlCertificateValuesType (xades4j.xml.bind.xades.XmlCertificateValuesType)1 XmlEncapsulatedPKIDataType (xades4j.xml.bind.xades.XmlEncapsulatedPKIDataType)1