Try to print out more information if the timestamp-operation fails

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1742425 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2016-05-05 12:22:44 +00:00
parent d158ef23bd
commit 61f84af565

View File

@ -168,7 +168,9 @@ public class TSPTimeStampService implements TimeStampService {
? "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 implements TimeStampService {
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) {