summary refs log tree commit diff
path: root/crypto/src/pkix
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 15:07:29 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 15:07:29 +0700
commitb72579c4b1200459f959bcd6a25364e239420573 (patch)
tree5e566cc2b7972cd8ccebece92d879bddc800393d /crypto/src/pkix
parentRemove certpath from PkixCertPathValidatorException (diff)
downloadBouncyCastle.NET-ed25519-b72579c4b1200459f959bcd6a25364e239420573.tar.xz
Cleanup Exception classes
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r--crypto/src/pkix/PkixCertPathBuilderException.cs32
-rw-r--r--crypto/src/pkix/PkixCertPathValidatorException.cs10
-rw-r--r--crypto/src/pkix/PkixNameConstraintValidatorException.cs26
3 files changed, 46 insertions, 22 deletions
diff --git a/crypto/src/pkix/PkixCertPathBuilderException.cs b/crypto/src/pkix/PkixCertPathBuilderException.cs
index 46845d287..81c833459 100644
--- a/crypto/src/pkix/PkixCertPathBuilderException.cs
+++ b/crypto/src/pkix/PkixCertPathBuilderException.cs
@@ -1,22 +1,32 @@
 using System;
+using System.Runtime.Serialization;
 
 using Org.BouncyCastle.Security;
 
 namespace Org.BouncyCastle.Pkix
 {
-	/// <summary>
-	/// Summary description for PkixCertPathBuilderException.
-	/// </summary>
-#if !PORTABLE
     [Serializable]
-#endif
-    public class PkixCertPathBuilderException : GeneralSecurityException
+    public class PkixCertPathBuilderException
+		: GeneralSecurityException
 	{
-		public PkixCertPathBuilderException() : base() { }
-		
-		public PkixCertPathBuilderException(string message) : base(message)	{ }  
+		public PkixCertPathBuilderException()
+			: base()
+		{
+		}
 
-		public PkixCertPathBuilderException(string message, Exception exception) : base(message, exception) { }
-		
+		public PkixCertPathBuilderException(string message)
+			: base(message)
+		{
+		}
+
+		public PkixCertPathBuilderException(string message, Exception innerException)
+			: base(message, innerException)
+		{
+		}
+
+		protected PkixCertPathBuilderException(SerializationInfo info, StreamingContext context)
+			: base(info, context)
+		{
+		}
 	}
 }
diff --git a/crypto/src/pkix/PkixCertPathValidatorException.cs b/crypto/src/pkix/PkixCertPathValidatorException.cs
index f2152bcd3..effb60569 100644
--- a/crypto/src/pkix/PkixCertPathValidatorException.cs
+++ b/crypto/src/pkix/PkixCertPathValidatorException.cs
@@ -45,8 +45,8 @@ namespace Org.BouncyCastle.Pkix
 		{
 		}
 
-		public PkixCertPathValidatorException(string message, Exception exception)
-			: base(message, exception)
+		public PkixCertPathValidatorException(string message, Exception innerException)
+			: base(message, innerException)
 		{
 		}
 
@@ -55,10 +55,10 @@ namespace Org.BouncyCastle.Pkix
 		/// detail message, cause, certification path, and index.
 		/// </summary>
 		/// <param name="message">the detail message (or <code>null</code> if none)</param>
-		/// <param name="exception">the cause (or <code>null</code> if none)</param>
+		/// <param name="innerException">the cause (or <code>null</code> if none)</param>
 		/// <param name="index">the index of the certificate in the certification path that</param>																																																																																   * 
-		public PkixCertPathValidatorException(string message, Exception exception, int index)
-			: base(message, exception)
+		public PkixCertPathValidatorException(string message, Exception innerException, int index)
+			: base(message, innerException)
 		{
 			if (index < -1)
 				throw new ArgumentException("cannot be < -1", nameof(index));
diff --git a/crypto/src/pkix/PkixNameConstraintValidatorException.cs b/crypto/src/pkix/PkixNameConstraintValidatorException.cs
index d0882ca96..c67123506 100644
--- a/crypto/src/pkix/PkixNameConstraintValidatorException.cs
+++ b/crypto/src/pkix/PkixNameConstraintValidatorException.cs
@@ -1,16 +1,30 @@
 using System;
+using System.Runtime.Serialization;
 
 namespace Org.BouncyCastle.Pkix
 {
-#if !PORTABLE
     [Serializable]
-#endif
     public class PkixNameConstraintValidatorException
         : Exception
     {
-        public PkixNameConstraintValidatorException(string msg)
-            : base(msg)
-        {
-        }
+		public PkixNameConstraintValidatorException()
+			: base()
+		{
+		}
+
+		public PkixNameConstraintValidatorException(string message)
+			: base(message)
+		{
+		}
+
+		public PkixNameConstraintValidatorException(string message, Exception innerException)
+			: base(message, innerException)
+		{
+		}
+
+		protected PkixNameConstraintValidatorException(SerializationInfo info, StreamingContext context)
+			: base(info, context)
+		{
+		}
     }
 }