]> source.dussan.org Git - poi.git/commitdiff
POI 59257 upgrade Bouncy Castle to 1.54
authorTim Allison <tallison@apache.org>
Fri, 1 Apr 2016 00:57:56 +0000 (00:57 +0000)
committerTim Allison <tallison@apache.org>
Fri, 1 Apr 2016 00:57:56 +0000 (00:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1737298 13f79535-47bb-0310-9956-ffa450edef68

.classpath
build.xml
sonar/ooxml/pom.xml
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
test-data/openxml4j/at.pzp.www_uploads_media_PP_Scheinecker-jdk6error.pptx

index 5a7d21738b42175853b5e79171c856e3d2a0bcb3..e133168db4c4e999fd50c955bf88a026bef82fee 100644 (file)
@@ -26,8 +26,8 @@
        <classpathentry kind="lib" path="ooxml-lib/ooxml-security-1.1.jar" sourcepath="ooxml-lib/ooxml-security-1.1-sources.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="lib" path="compile-lib/slf4j-api-1.7.12.jar"/>
-       <classpathentry kind="lib" path="compile-lib/bcpkix-jdk15on-1.53.jar"/>
-       <classpathentry kind="lib" path="compile-lib/bcprov-ext-jdk15on-1.53.jar"/>
+       <classpathentry kind="lib" path="compile-lib/bcpkix-jdk15on-1.54.jar"/>
+       <classpathentry kind="lib" path="compile-lib/bcprov-ext-jdk15on-1.54.jar"/>
        <classpathentry kind="lib" path="compile-lib/xmlsec-2.0.6.jar"/>
        <classpathentry kind="lib" path="lib/commons-codec-1.10.jar"/>
        <classpathentry kind="lib" path="lib/commons-logging-1.2.jar"/>
index a3e75f25e867b03d5299dfd2b1026281d9010d5d..19f9c8b4166a05d0ae79194fbc9acc09c11f4a25 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -164,10 +164,10 @@ under the License.
     <!-- xml signature libs -->
     <property name="dsig.xmlsec.jar" location="${compile.lib}/xmlsec-2.0.6.jar"/>
     <property name="dsig.xmlsec.url" value="${repository.m2}/maven2/org/apache/santuario/xmlsec/2.0.6/xmlsec-2.0.6.jar"/>
-    <property name="dsig.bouncycastle-prov.jar" location="${compile.lib}/bcprov-ext-jdk15on-1.53.jar"/>
-    <property name="dsig.bouncycastle-prov.url" value="${repository.m2}/maven2/org/bouncycastle/bcprov-ext-jdk15on/1.53/bcprov-ext-jdk15on-1.53.jar"/>
-    <property name="dsig.bouncycastle-pkix.jar" location="${compile.lib}/bcpkix-jdk15on-1.53.jar"/>
-    <property name="dsig.bouncycastle-pkix.url" value="${repository.m2}/maven2/org/bouncycastle/bcpkix-jdk15on/1.53/bcpkix-jdk15on-1.53.jar"/>
+    <property name="dsig.bouncycastle-prov.jar" location="${compile.lib}/bcprov-ext-jdk15on-1.54.jar"/>
+    <property name="dsig.bouncycastle-prov.url" value="${repository.m2}/maven2/org/bouncycastle/bcprov-ext-jdk15on/1.54/bcprov-ext-jdk15on-1.54.jar"/>
+    <property name="dsig.bouncycastle-pkix.jar" location="${compile.lib}/bcpkix-jdk15on-1.54.jar"/>
+    <property name="dsig.bouncycastle-pkix.url" value="${repository.m2}/maven2/org/bouncycastle/bcpkix-jdk15on/1.54/bcpkix-jdk15on-1.54.jar"/>
     <property name="dsig.sl4j-api.jar" location="${compile.lib}/slf4j-api-1.7.12.jar"/>
     <property name="dsig.sl4j-api.url" value="${repository.m2}/maven2/org/slf4j/slf4j-api/1.7.12/slf4j-api-1.7.12.jar"/>
 
index 25559380c10d2cd1381d639920971ec6ece26d37..5d4fcc36a24a9dd263f8db9fe4428512a7072a23 100644 (file)
                <dependency>
                        <groupId>org.bouncycastle</groupId>
                        <artifactId>bcpkix-jdk15on</artifactId>
-                       <version>1.53</version>
+                       <version>1.54</version>
                </dependency>
                <dependency>
                        <groupId>org.bouncycastle</groupId>
                        <artifactId>bcprov-jdk15on</artifactId>
-                       <version>1.53</version>
+                       <version>1.54</version>
                </dependency>
                <dependency>
                        <groupId>org.apache.santuario</groupId>
index 10174d54d8c5d955823bebf65fd441a35aef741e..f9afb7869e72d3a293b77f2879d6f4761105f5a0 100644 (file)
 \r
 package org.apache.poi.poifs.crypt.dsig;\r
 \r
-import static org.apache.poi.POIXMLTypeLoader.DEFAULT_XML_OPTIONS;\r
-import static org.apache.poi.poifs.crypt.dsig.facets.SignatureFacet.XML_DIGSIG_NS;\r
-\r
-import java.io.ByteArrayOutputStream;\r
-import java.io.File;\r
-import java.io.IOException;\r
-import java.io.OutputStream;\r
-import java.security.GeneralSecurityException;\r
-import java.security.MessageDigest;\r
-import java.security.Provider;\r
-import java.security.Security;\r
-import java.security.cert.X509Certificate;\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.HashMap;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.NoSuchElementException;\r
-\r
-import javax.crypto.Cipher;\r
-import javax.xml.crypto.MarshalException;\r
-import javax.xml.crypto.URIDereferencer;\r
+import static org.apache.poi.POIXMLTypeLoader.DEFAULT_XML_OPTIONS;
+import static org.apache.poi.poifs.crypt.dsig.facets.SignatureFacet.XML_DIGSIG_NS;
+
+import javax.crypto.Cipher;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.URIDereferencer;
 import javax.xml.crypto.XMLStructure;\r
 import javax.xml.crypto.dsig.CanonicalizationMethod;\r
 import javax.xml.crypto.dsig.Manifest;\r
@@ -62,12 +45,28 @@ import javax.xml.crypto.dsig.XMLValidateContext;
 import javax.xml.crypto.dsig.dom.DOMSignContext;\r
 import javax.xml.crypto.dsig.dom.DOMValidateContext;\r
 import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;\r
-import javax.xml.xpath.XPath;\r
-import javax.xml.xpath.XPathConstants;\r
-import javax.xml.xpath.XPathFactory;\r
-\r
-import org.apache.jcp.xml.dsig.internal.dom.DOMReference;\r
-import org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo;\r
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.security.GeneralSecurityException;
+import java.security.MessageDigest;
+import java.security.Provider;
+import java.security.Security;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import org.apache.jcp.xml.dsig.internal.dom.DOMReference;
+import org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo;
 import org.apache.poi.EncryptedDocumentException;\r
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;\r
 import org.apache.poi.openxml4j.opc.ContentTypes;\r
@@ -159,13 +158,13 @@ import org.w3c.dom.events.EventTarget;
  * Therefore we are using the Apache Santuario libs (xmlsec) instead of the built-in classes,\r
  * as the compatibility seems to be provided there.</p>\r
  * \r
- * <p>To use SignatureInfo and its sibling classes, you'll need to have the following libs\r
- * in the classpath:</p>\r
- * <ul>\r
- * <li>BouncyCastle bcpkix and bcprov (tested against 1.53)</li>\r
- * <li>Apache Santuario "xmlsec" (tested against 2.0.5)</li>\r
- * <li>and slf4j-api (tested against 1.7.12)</li>\r
- * </ul>\r
+ * <p>To use SignatureInfo and its sibling classes, you'll need to have the following libs
+ * in the classpath:</p>
+ * <ul>
+ * <li>BouncyCastle bcpkix and bcprov (tested against 1.54)</li>
+ * <li>Apache Santuario "xmlsec" (tested against 2.0.5)</li>
+ * <li>and slf4j-api (tested against 1.7.12)</li>
+ * </ul>
  */\r
 public class SignatureInfo implements SignatureConfigurable {\r
 \r
index 7f9ff0c6f698ddabd67b1a327076197cbf10ef14..dc76a0170fd2bdd12ad292ca295c3c28a77045b4 100644 (file)
Binary files a/test-data/openxml4j/at.pzp.www_uploads_media_PP_Scheinecker-jdk6error.pptx and b/test-data/openxml4j/at.pzp.www_uploads_media_PP_Scheinecker-jdk6error.pptx differ