diff options
Diffstat (limited to 'crypto/src/x509/X509CrlParser.cs')
-rw-r--r-- | crypto/src/x509/X509CrlParser.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crypto/src/x509/X509CrlParser.cs b/crypto/src/x509/X509CrlParser.cs index ad2b4f704..a60a591c4 100644 --- a/crypto/src/x509/X509CrlParser.cs +++ b/crypto/src/x509/X509CrlParser.cs @@ -131,11 +131,14 @@ namespace Org.BouncyCastle.X509 return ReadPemCrl(inStream); Asn1InputStream asn1 = lazyAsn1 - ? new LazyAsn1InputStream(inStream) - : new Asn1InputStream(inStream); + ? new LazyAsn1InputStream(inStream, int.MaxValue, leaveOpen: true) + : new Asn1InputStream(inStream, int.MaxValue, leaveOpen: true); - return ReadDerCrl(asn1); - } + using (asn1) + { + return ReadDerCrl(asn1); + } + } catch (CrlException e) { throw e; |