summary refs log tree commit diff
path: root/crypto/src/pkix/PkixCertPathValidatorException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/pkix/PkixCertPathValidatorException.cs')
-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