Author: tilman
Date: Sun Jan 19 15:10:57 2025
New Revision: 1923233
URL: http://svn.apache.org/viewvc?rev=1923233&view=rev
Log:
PDFBOX-5660: use constant
Modified:
pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
Modified:
pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
URL:
http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java?rev=1923233&r1=1923232&r2=1923233&view=diff
==============================================================================
---
pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
(original)
+++
pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
Sun Jan 19 15:10:57 2025
@@ -154,6 +154,9 @@ public class TestCreateSignature
certificate =
keyStore.getCertificateChain(keyStore.aliases().nextElement())[0];
tsa = System.getProperty("org.apache.pdfbox.examples.pdmodel.tsa");
+
+ //tsa = "https://freetsa.org/tsr";
+ tsa = "http://time.certum.pl";
}
/**
@@ -868,9 +871,9 @@ public class TestCreateSignature
byte[] contents = signature.getContents();
PDDocumentCatalog docCatalog = doc.getDocumentCatalog();
- COSDictionary dssDict =
docCatalog.getCOSObject().getCOSDictionary(COSName.getPDFName("DSS"));
+ COSDictionary dssDict =
docCatalog.getCOSObject().getCOSDictionary(COSName.DSS);
COSArray dssCertArray = dssDict.getCOSArray(COSName.CERTS);
- COSDictionary vriDict =
dssDict.getCOSDictionary(COSName.getPDFName("VRI"));
+ COSDictionary vriDict = dssDict.getCOSDictionary(COSName.VRI);
// Check that all known signature certificates are in the
VRI/signaturehash/Cert array
byte[] signatureHash =
MessageDigest.getInstance("SHA-1").digest(contents);