aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2017-06-29 09:33:33 +0000
committerAndreas Beeker <kiwiwings@apache.org>2017-06-29 09:33:33 +0000
commitba37eb9a2983958265b97f7aca9977713029e5a8 (patch)
tree203b0934f8d80b91c825dad39b957802347814b7
parentbcdbd92d435efe6cb28de445fa352c37b1ec2775 (diff)
downloadpoi-ba37eb9a2983958265b97f7aca9977713029e5a8.tar.gz
poi-ba37eb9a2983958265b97f7aca9977713029e5a8.zip
remove timezoned call to Date.toString() - SignatureProperties don't necessarily need an Id attribute
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800257 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java3
-rw-r--r--src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java6
2 files changed, 4 insertions, 5 deletions
diff --git a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java
index d8164cdc68..f7b1f95470 100644
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java
@@ -240,8 +240,7 @@ public class OOXMLSignatureFacet extends SignatureFacet {
List<SignatureProperty> signaturePropertyContent = new ArrayList<SignatureProperty>();
signaturePropertyContent.add(signatureTimeSignatureProperty);
SignatureProperties signatureProperties = getSignatureFactory()
- .newSignatureProperties(signaturePropertyContent,
- "id-signature-time-" + signatureConfig.getExecutionTime());
+ .newSignatureProperties(signaturePropertyContent, null);
objectContent.add(signatureProperties);
}
diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
index ae04478ad4..c9ceb113d1 100644
--- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
+++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
@@ -184,11 +184,11 @@ public class TestSignatureInfo {
signatureConfig.setOpcPackage(pkg2);
assertTrue(si.verifySignature());
String signExp =
- "Lxp2LFa+0YWGOBL8zVdf7SWRQiNK/Tt85W+kmH1bunlua030BKbQc6yWIIk6gN6jCTtrJ1h2eMRbLwymygOUpM"+
- "dd0MeQY3mMWRSO9qEW87SQvyDqBh71zXWW3ZYET+vJWr3BCNEtXCy8jZvgXqILBGk5vMJW/EYaUEhBcDGjCm0=";
+ "HDdvgXblLMiE6gZSoRSQUof6+aedrhK9i51we1n+4Q/ioqrQCeh5UkfQ8lD63nV4ZDbM4/pIVFi6VpMpN/HMnA"+
+ "UHeVdVUCVTgpn3Iz21Ymcd9/aerNov2BjHLhS8X3oUE+XTu2TbJLNmms0I9G4lfg6HWP9t7ZCXBXy6vyCMArc=";
String signAct = si.getSignatureParts().iterator().next().
getSignatureDocument().getSignature().getSignatureValue().getStringValue();
-// assertEquals(signExp, signAct);
+ assertEquals(signExp, signAct);
if (new File("build").exists()) {
// write out to build, for further comparison between local and Jenkins box