diff options
author | David Hook <dgh@cryptoworkshop.com> | 2013-10-05 12:02:09 +0400 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2013-10-05 12:02:09 +0400 |
commit | f95c2df7305cf3bf7d1767e52026db031e350e6a (patch) | |
tree | c640971704a1ec183a10f484dafbe45838defed1 /pkix/src/main | |
parent | 24f0d689e5bd9a2414fac5c6a53191c47343c357 (diff) |
fixed extension bug in InputStream constructor.
Diffstat (limited to 'pkix/src/main')
-rw-r--r-- | pkix/src/main/java/org/bouncycastle/tsp/TimeStampRequest.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkix/src/main/java/org/bouncycastle/tsp/TimeStampRequest.java b/pkix/src/main/java/org/bouncycastle/tsp/TimeStampRequest.java index 42641f84..696c2d8c 100644 --- a/pkix/src/main/java/org/bouncycastle/tsp/TimeStampRequest.java +++ b/pkix/src/main/java/org/bouncycastle/tsp/TimeStampRequest.java @@ -57,9 +57,15 @@ public class TimeStampRequest public TimeStampRequest(InputStream in) throws IOException { + this(loadRequest(in)); + } + + private static TimeStampReq loadRequest(InputStream in) + throws IOException + { try { - this.req = TimeStampReq.getInstance(new ASN1InputStream(in).readObject()); + return TimeStampReq.getInstance(new ASN1InputStream(in).readObject()); } catch (ClassCastException e) { |