5 files changed, 16 insertions, 4 deletions
diff --git a/crypto/src/x509/X509AttrCertParser.cs b/crypto/src/x509/X509AttrCertParser.cs
index 0019a48eb..39727a0e2 100644
--- a/crypto/src/x509/X509AttrCertParser.cs
+++ b/crypto/src/x509/X509AttrCertParser.cs
@@ -141,6 +141,10 @@ namespace Org.BouncyCastle.X509
return ReadDerCertificate(new Asn1InputStream(inStream));
}
+ catch (CertificateException)
+ {
+ throw;
+ }
catch (Exception e)
{
throw new CertificateException(e.ToString());
diff --git a/crypto/src/x509/X509CertPairParser.cs b/crypto/src/x509/X509CertPairParser.cs
index 95ba522c8..d8ecd9ddf 100644
--- a/crypto/src/x509/X509CertPairParser.cs
+++ b/crypto/src/x509/X509CertPairParser.cs
@@ -74,6 +74,10 @@ namespace Org.BouncyCastle.X509
return ReadDerCrossCertificatePair(inStream);
}
+ catch (CertificateException)
+ {
+ throw;
+ }
catch (Exception e)
{
throw new CertificateException(e.ToString());
diff --git a/crypto/src/x509/X509CertificateParser.cs b/crypto/src/x509/X509CertificateParser.cs
index 6fc1b3ff4..2d6da0f23 100644
--- a/crypto/src/x509/X509CertificateParser.cs
+++ b/crypto/src/x509/X509CertificateParser.cs
@@ -143,6 +143,10 @@ namespace Org.BouncyCastle.X509
return ReadDerCertificate(asn1In);
}
}
+ catch (CertificateException)
+ {
+ throw;
+ }
catch (Exception e)
{
throw new CertificateException("Failed to read certificate", e);
diff --git a/crypto/src/x509/X509CrlParser.cs b/crypto/src/x509/X509CrlParser.cs
index 53a02393b..040943104 100644
--- a/crypto/src/x509/X509CrlParser.cs
+++ b/crypto/src/x509/X509CrlParser.cs
@@ -138,9 +138,9 @@ namespace Org.BouncyCastle.X509
return ReadDerCrl(asn1);
}
}
- catch (CrlException e)
+ catch (CrlException)
{
- throw e;
+ throw;
}
catch (Exception e)
{
diff --git a/crypto/src/x509/X509V2AttributeCertificate.cs b/crypto/src/x509/X509V2AttributeCertificate.cs
index b5a316d76..836213fdc 100644
--- a/crypto/src/x509/X509V2AttributeCertificate.cs
+++ b/crypto/src/x509/X509V2AttributeCertificate.cs
@@ -27,9 +27,9 @@ namespace Org.BouncyCastle.X509
{
return AttributeCertificate.GetInstance(Asn1Object.FromStream(input));
}
- catch (IOException e)
+ catch (IOException)
{
- throw e;
+ throw;
}
catch (Exception e)
{
|