poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1742425 - /poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java
Date Thu, 05 May 2016 12:22:44 GMT
Author: centic
Date: Thu May  5 12:22:44 2016
New Revision: 1742425

URL: http://svn.apache.org/viewvc?rev=1742425&view=rev
Log:
Try to print out more information if the timestamp-operation fails

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java?rev=1742425&r1=1742424&r2=1742425&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java
Thu May  5 12:22:44 2016
@@ -168,7 +168,9 @@ public class TSPTimeStampService impleme
             ? "application/timestamp-response"
             : "application/timestamp-reply"
         )) {
-            throw new RuntimeException("invalid Content-Type: " + contentType);
+            throw new RuntimeException("invalid Content-Type: " + contentType +
+                    // dump the first few bytes
+                    ": " + HexDump.dump(bos.toByteArray(), 0, 0, 200));
         }
         
         if (bos.size() == 0) {
@@ -248,8 +250,7 @@ public class TSPTimeStampService impleme
         LOG.log(POILogger.DEBUG, "time-stamp token time: "
                 + timeStampToken.getTimeStampInfo().getGenTime());
 
-        byte[] timestamp = timeStampToken.getEncoded();
-        return timestamp;
+        return timeStampToken.getEncoded();
     }
 
     public void setSignatureConfig(SignatureConfig signatureConfig) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message