summary refs log tree commit diff
path: root/crypto/src/pkix
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-07-01 16:04:26 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-07-01 16:04:26 +0700
commit7667960b24e63b23518408337c69d5f36c5dfd94 (patch)
tree5a4d0d42d37cd2413b3ec7b68eccfb16f3d4a858 /crypto/src/pkix
parentRework EdDSA precomputations (diff)
downloadBouncyCastle.NET-ed25519-7667960b24e63b23518408337c69d5f36c5dfd94.tar.xz
Custom serialization
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r--crypto/src/pkix/PkixCertPathValidatorException.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/src/pkix/PkixCertPathValidatorException.cs b/crypto/src/pkix/PkixCertPathValidatorException.cs
index effb60569..3c9dbe349 100644
--- a/crypto/src/pkix/PkixCertPathValidatorException.cs
+++ b/crypto/src/pkix/PkixCertPathValidatorException.cs
@@ -33,7 +33,7 @@ namespace Org.BouncyCastle.Pkix
     public class PkixCertPathValidatorException
         : GeneralSecurityException
 	{
-		private readonly int m_index = -1;
+		protected readonly int m_index = -1;
 
 		public PkixCertPathValidatorException()
 			: base()
@@ -69,6 +69,13 @@ namespace Org.BouncyCastle.Pkix
 		protected PkixCertPathValidatorException(SerializationInfo info, StreamingContext context)
 			: base(info, context)
 		{
+			m_index = info.GetInt32("index");
+		}
+
+		public override void GetObjectData(SerializationInfo info, StreamingContext context)
+		{
+			base.GetObjectData(info, context);
+			info.AddValue("index", m_index);
 		}
 
 		/// <summary> eturns the index of the certificate in the certification path that caused the exception to be