summary refs log tree commit diff
path: root/crypto/src/pkix
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-09-14 14:23:01 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-09-14 14:23:01 +0700
commit3124e402477d36636fad5ac3036ef56088cecf65 (patch)
treeae4c5b178e87d8fabd4feff0609448abb3d5dc3a /crypto/src/pkix
parentadded Dilithium ack (diff)
downloadBouncyCastle.NET-ed25519-3124e402477d36636fad5ac3036ef56088cecf65.tar.xz
DateTimeObject => nullable DateTime
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r--crypto/src/pkix/CertStatus.cs6
-rw-r--r--crypto/src/pkix/PkixCertPathValidatorUtilities.cs5
-rw-r--r--crypto/src/pkix/PkixCrlUtilities.cs3
-rw-r--r--crypto/src/pkix/PkixParameters.cs5
4 files changed, 7 insertions, 12 deletions
diff --git a/crypto/src/pkix/CertStatus.cs b/crypto/src/pkix/CertStatus.cs
index 4f40b7bc6..aff1b1857 100644
--- a/crypto/src/pkix/CertStatus.cs
+++ b/crypto/src/pkix/CertStatus.cs
@@ -1,7 +1,5 @@
 using System;
 
-using Org.BouncyCastle.Utilities.Date;
-
 namespace Org.BouncyCastle.Pkix
 {
     public class CertStatus
@@ -12,12 +10,12 @@ namespace Org.BouncyCastle.Pkix
 
         private int status = Unrevoked;
 
-        DateTimeObject revocationDate = null;
+        DateTime? revocationDate = null;
 
         /// <summary>
         /// Returns the revocationDate.
         /// </summary>
-         public DateTimeObject RevocationDate
+         public DateTime? RevocationDate
         {
             get { return revocationDate; }
             set { this.revocationDate = value; }
diff --git a/crypto/src/pkix/PkixCertPathValidatorUtilities.cs b/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
index 2514f1df2..a1c3ce734 100644
--- a/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
+++ b/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
@@ -11,7 +11,6 @@ using Org.BouncyCastle.Math;
 using Org.BouncyCastle.Security;
 using Org.BouncyCastle.Utilities;
 using Org.BouncyCastle.Utilities.Collections;
-using Org.BouncyCastle.Utilities.Date;
 using Org.BouncyCastle.X509;
 using Org.BouncyCastle.X509.Extension;
 using Org.BouncyCastle.X509.Store;
@@ -173,7 +172,7 @@ namespace Org.BouncyCastle.Pkix
 
 		internal static DateTime GetValidDate(PkixParameters paramsPKIX)
 		{
-			DateTimeObject validDate = paramsPKIX.Date;
+			DateTime? validDate = paramsPKIX.Date;
 
 			if (validDate == null)
 				return DateTime.UtcNow;
@@ -541,7 +540,7 @@ namespace Org.BouncyCastle.Pkix
 
             // (i) or (j)
             certStatus.Status = reasonCodeValue;
-            certStatus.RevocationDate = new DateTimeObject(revocationDate);
+            certStatus.RevocationDate = revocationDate;
         }
 
 		/**
diff --git a/crypto/src/pkix/PkixCrlUtilities.cs b/crypto/src/pkix/PkixCrlUtilities.cs
index 8740cc780..facbf56c2 100644
--- a/crypto/src/pkix/PkixCrlUtilities.cs
+++ b/crypto/src/pkix/PkixCrlUtilities.cs
@@ -2,7 +2,6 @@ using System;
 using System.Collections.Generic;
 
 using Org.BouncyCastle.Utilities.Collections;
-using Org.BouncyCastle.Utilities.Date;
 using Org.BouncyCastle.X509;
 using Org.BouncyCastle.X509.Store;
 
@@ -36,7 +35,7 @@ namespace Org.BouncyCastle.Pkix
 			// based on RFC 5280 6.3.3
 			foreach (X509Crl crl in initialSet)
 			{
-                DateTimeObject nextUpdate = crl.NextUpdate;
+                DateTime? nextUpdate = crl.NextUpdate;
 
                 if (null == nextUpdate || nextUpdate.Value.CompareTo(validityDate) > 0)
 				{
diff --git a/crypto/src/pkix/PkixParameters.cs b/crypto/src/pkix/PkixParameters.cs
index 8e4c609ed..89124f2e9 100644
--- a/crypto/src/pkix/PkixParameters.cs
+++ b/crypto/src/pkix/PkixParameters.cs
@@ -2,7 +2,6 @@ using System;
 using System.Collections.Generic;
 
 using Org.BouncyCastle.Utilities.Collections;
-using Org.BouncyCastle.Utilities.Date;
 using Org.BouncyCastle.X509;
 
 namespace Org.BouncyCastle.Pkix
@@ -38,7 +37,7 @@ namespace Org.BouncyCastle.Pkix
 		public const int ChainValidityModel = 1;
 
 		private HashSet<TrustAnchor> trustAnchors;
-		private DateTimeObject date;
+		private DateTime? date;
 		private List<PkixCertPathChecker> m_checkers;
 		private bool revocationEnabled = true;
 		private HashSet<string> initialPolicies;
@@ -174,7 +173,7 @@ namespace Org.BouncyCastle.Pkix
 		//	set { this.checkOnlyEECertificateCrl = value; }
 		//}
 
-		public virtual DateTimeObject Date
+		public virtual DateTime? Date
 		{
 			get { return this.date; }
 			set { this.date = value; }