pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1642779 - /pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
Date Mon, 01 Dec 2014 22:55:27 GMT
Author: tilman
Date: Mon Dec  1 22:55:26 2014
New Revision: 1642779

URL: http://svn.apache.org/r1642779
Log:
PDFBOX-2533: add decryptDictionary method in preflightParser too

Modified:
    pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java

Modified: pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java?rev=1642779&r1=1642778&r2=1642779&view=diff
==============================================================================
--- pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
(original)
+++ pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
Mon Dec  1 22:55:26 2014
@@ -797,19 +797,11 @@ public class PreflightParser extends Non
                     // decrypt
                     if (pb instanceof COSString)
                     {
-                        decrypt((COSString) pb, objNr, objGenNr);
+                        decryptString((COSString) pb, objNr, objGenNr);
                     }
                     else if (pb instanceof COSDictionary)
                     {
-                        for (Entry<COSName, COSBase> entry : ((COSDictionary) pb).entrySet())
-                        {
-                            // TODO: specially handle 'Contents' entry of signature dictionary
like in
-                            // SecurityHandler#decryptDictionary
-                            if (entry.getValue() instanceof COSString)
-                            {
-                                decrypt((COSString) entry.getValue(), objNr, objGenNr);
-                            }
-                        }
+                        decryptDictionary((COSDictionary) pb, objNr, objGenNr);
                     }
                     else if (pb instanceof COSArray)
                     {
@@ -818,7 +810,7 @@ public class PreflightParser extends Non
                         {
                             if (array.get(aIdx) instanceof COSString)
                             {
-                                decrypt((COSString) array.get(aIdx), objNr, objGenNr);
+                                decryptString((COSString) array.get(aIdx), objNr, objGenNr);
                             }
                         }
                     }



Mime
View raw message