<!-- 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"/>
\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
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
* 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