You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2014/11/06 00:33:33 UTC
svn commit: r1637005 -
/poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
Author: kiwiwings
Date: Wed Nov 5 23:33:33 2014
New Revision: 1637005
URL: http://svn.apache.org/r1637005
Log:
another blind sha2 bug fix ...
Modified:
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
Modified: poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java?rev=1637005&r1=1637004&r2=1637005&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java Wed Nov 5 23:33:33 2014
@@ -241,6 +241,8 @@ public class SignatureInfo implements Si
}
return valid;
+ } catch (ArrayIndexOutOfBoundsException e) {
+ throw new JvmBrokenException(e);
} catch (Exception e) {
LOG.log(POILogger.ERROR, "error in marshalling and validating the signature", e);
return false;
@@ -538,7 +540,7 @@ public class SignatureInfo implements Si
String description = signatureConfig.getSignatureDescription();
return new DigestInfo(digestValue, signatureConfig.getDigestAlgo(), description);
} catch (ArrayIndexOutOfBoundsException e) {
- throw new EncryptedDocumentException("\"your JVM is just too broken\" - check https://bugzilla.redhat.com/show_bug.cgi?id=1155012 if this applies to the stacktrace ...", e);
+ throw new JvmBrokenException(e);
}
}
@@ -649,4 +651,10 @@ public class SignatureInfo implements Si
private static <T> List<T> safe(List<T> other) {
return other == null ? Collections.EMPTY_LIST : other;
}
+
+ private static class JvmBrokenException extends EncryptedDocumentException {
+ public JvmBrokenException(Throwable cause) {
+ super("\"your JVM is just too broken\" - check https://bugzilla.redhat.com/show_bug.cgi?id=1155012 if this applies to the stacktrace ...", cause);
+ }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org