diff options
author | David Hook <dgh@cryptoworkshop.com> | 2013-05-13 06:43:08 +0400 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2013-05-13 06:43:08 +0400 |
commit | cfeb6a4b3acacf607c0fe48d9553c612f3298898 (patch) | |
tree | ce47ec10e76e02cfc5b659a3724c94160590fe81 | |
parent | a9922353b97814b506b8e9ebfc4745610f7a8e21 (diff) |
minor cleanups
3 files changed, 21 insertions, 2 deletions
diff --git a/src/main/java/org/bouncycastle/cert/CertRuntimeException.java b/src/main/java/org/bouncycastle/cert/CertRuntimeException.java new file mode 100644 index 00000000..5384148a --- /dev/null +++ b/src/main/java/org/bouncycastle/cert/CertRuntimeException.java @@ -0,0 +1,19 @@ +package org.bouncycastle.cert; + +public class CertRuntimeException + extends RuntimeException +{ + private Throwable cause; + + public CertRuntimeException(String msg, Throwable cause) + { + super(msg); + + this.cause = cause; + } + + public Throwable getCause() + { + return cause; + } +}
\ No newline at end of file diff --git a/src/main/java/org/bouncycastle/cert/X509ExtensionUtils.java b/src/main/java/org/bouncycastle/cert/X509ExtensionUtils.java index 43c5948d..9afaf040 100644 --- a/src/main/java/org/bouncycastle/cert/X509ExtensionUtils.java +++ b/src/main/java/org/bouncycastle/cert/X509ExtensionUtils.java @@ -118,7 +118,7 @@ public class X509ExtensionUtils } catch (IOException e) { // it's hard to imagine this happening, but yes it does! - throw new IllegalStateException("unable to calculate identifier: " + e.getMessage(), e); + throw new CertRuntimeException("unable to calculate identifier: " + e.getMessage(), e); } return calculator.getDigest(); diff --git a/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/X509CertificateObject.java b/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/X509CertificateObject.java index ad7483a4..44220622 100644 --- a/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/X509CertificateObject.java +++ b/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/X509CertificateObject.java @@ -66,7 +66,7 @@ import org.bouncycastle.util.Arrays; import org.bouncycastle.util.Integers; import org.bouncycastle.util.encoders.Hex; -class X509CertificateObject +class X509CertificateObject extends X509Certificate implements PKCS12BagAttributeCarrier { |