private void outputDss(PdfDictionary dss, PdfDictionary vrim, PdfArray ocsps, PdfArray crls, PdfArray certs) throws IOException {
PdfDictionary catalog = reader.getCatalog();
stp.markUsed(catalog);
for (PdfName vkey : validated.keySet()) {
PdfArray ocsp = new PdfArray();
PdfArray crl = new PdfArray();
PdfArray cert = new PdfArray();
PdfDictionary vri = new PdfDictionary();
for (byte[] b : validated.get(vkey).crls) {
PdfStream ps = new PdfStream(b);
ps.flateCompress();
PdfIndirectReference iref = writer.addToBody(ps, false).getIndirectReference();
crl.add(iref);
crls.add(iref);
}
for (byte[] b : validated.get(vkey).ocsps) {
PdfStream ps = new PdfStream(b);
ps.flateCompress();
PdfIndirectReference iref = writer.addToBody(ps, false).getIndirectReference();
ocsp.add(iref);
ocsps.add(iref);
}
for (byte[] b : validated.get(vkey).certs) {
PdfStream ps = new PdfStream(b);
ps.flateCompress();
PdfIndirectReference iref = writer.addToBody(ps, false).getIndirectReference();
cert.add(iref);
certs.add(iref);
}
if (ocsp.size() > 0)
vri.put(PdfName.OCSP, writer.addToBody(ocsp, false).getIndirectReference());
if (crl.size() > 0)
vri.put(PdfName.CRL, writer.addToBody(crl, false).getIndirectReference());
if (cert.size() > 0)
vri.put(PdfName.CERT, writer.addToBody(cert, false).getIndirectReference());
vrim.put(vkey, writer.addToBody(vri, false).getIndirectReference());
}
dss.put(PdfName.VRI, writer.addToBody(vrim, false).getIndirectReference());
if (ocsps.size() > 0)