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 2015/07/16 22:32:02 UTC

svn commit: r1691445 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java

Author: tilman
Date: Thu Jul 16 20:32:01 2015
New Revision: 1691445

URL: http://svn.apache.org/r1691445
Log:
PDFBOX-2888: modify test to verify that calling setAllSecurityToBeRemoved(true) before calling protect() has no effect

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java?rev=1691445&r1=1691444&r2=1691445&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java Thu Jul 16 20:32:01 2015
@@ -291,6 +291,10 @@ public class TestSymmetricKeyEncryption
         StandardProtectionPolicy spp = new StandardProtectionPolicy(ownerpassword, userpassword, ap);
         spp.setEncryptionKeyLength(keyLength);
         spp.setPermissions(permission);
+        
+        // This must have no effect and should only log a warning.
+        doc.setAllSecurityToBeRemoved(true);
+        
         doc.protect(spp);
 
         File pdfFile = new File(testResultsDir, prefix + keyLength + "-bit-encrypted.pdf");