You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2020/10/20 15:01:37 UTC
svn commit: r1882699 -
/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
Author: tilman
Date: Tue Oct 20 15:01:36 2020
New Revision: 1882699
URL: http://svn.apache.org/viewvc?rev=1882699&view=rev
Log:
PDFBOX-3017: /Type is optional in signature dictionary
Modified:
pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java?rev=1882699&r1=1882698&r2=1882699&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java (original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java Tue Oct 20 15:01:36 2020
@@ -270,7 +270,7 @@ public class SigUtils
{
PDSignature lastSignature = sortedMap.get(sortedMap.lastKey());
COSBase type = lastSignature.getCOSObject().getItem(COSName.TYPE);
- if (type.equals(COSName.SIG) || type.equals(COSName.DOC_TIME_STAMP))
+ if (type == null || COSName.SIG.equals(type) || COSName.DOC_TIME_STAMP.equals(type))
{
return lastSignature;
}