added constructor taking an input stream
package org.bouncycastle.tsp.ers;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.util.ArrayList;
import org.bouncycastle.tsp.TimeStampRequest;
import org.bouncycastle.tsp.TimeStampRequestGenerator;
import org.bouncycastle.tsp.TimeStampResponse;
+import org.bouncycastle.util.io.Streams;
/**
* RFC 4998 Evidence Record.
private final DigestCalculator digCalc;
private final ArchiveTimeStamp primaryArchiveTimeStamp;
+ public ERSEvidenceRecord(InputStream ersIn, DigestCalculatorProvider digestCalculatorProvider)
+ throws TSPException, ERSException, IOException
+ {
+ this(EvidenceRecord.getInstance(Streams.readAll(ersIn)), digestCalculatorProvider);
+ }
+
public ERSEvidenceRecord(byte[] evidenceRecord, DigestCalculatorProvider digestCalculatorProvider)
throws TSPException, ERSException
{
