summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2013-12-29 11:24:03 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2013-12-29 11:24:03 +0700
commit8d01bdcfcb8be68b6d2aa0f77a17ca6ac046993c (patch)
treea50e03c1fb1d7e63df0ffa0dc12415e8ee32469b
parentUse Platform.ToUpperInvariant (diff)
downloadBouncyCastle.NET-ed25519-8d01bdcfcb8be68b6d2aa0f77a17ca6ac046993c.tar.xz
Make date format consistent with Java tests
-rw-r--r--crypto/src/pkix/Rfc3280CertPathUtilities.cs8
-rw-r--r--crypto/src/pkix/Rfc3281CertPathUtilities.cs8
-rw-r--r--crypto/test/src/test/nist/NistCertPathTest.cs2
3 files changed, 9 insertions, 9 deletions
diff --git a/crypto/src/pkix/Rfc3280CertPathUtilities.cs b/crypto/src/pkix/Rfc3280CertPathUtilities.cs
index bae657d90..c6f3fbff9 100644
--- a/crypto/src/pkix/Rfc3280CertPathUtilities.cs
+++ b/crypto/src/pkix/Rfc3280CertPathUtilities.cs
@@ -1197,10 +1197,10 @@ namespace Org.BouncyCastle.Pkix
 			}
 			if (certStatus.Status != CertStatus.Unrevoked)
 			{
-				// TODO This format is forced by the NistCertPath tests
-				string formattedDate = certStatus.RevocationDate.Value.ToString(
-					"G", new CultureInfo("en-us"));
-				string message = "Certificate revocation after " + formattedDate;
+				// This format is enforced by the NistCertPath tests
+                string formattedDate = certStatus.RevocationDate.Value.ToString(
+                    "ddd MMM dd HH:mm:ss K yyyy");
+                string message = "Certificate revocation after " + formattedDate;
 				message += ", reason: " + CrlReasons[certStatus.Status];
 				throw new Exception(message);
 			}
diff --git a/crypto/src/pkix/Rfc3281CertPathUtilities.cs b/crypto/src/pkix/Rfc3281CertPathUtilities.cs
index bda2aa737..101ef5e11 100644
--- a/crypto/src/pkix/Rfc3281CertPathUtilities.cs
+++ b/crypto/src/pkix/Rfc3281CertPathUtilities.cs
@@ -195,10 +195,10 @@ namespace Org.BouncyCastle.Pkix
 					}
 					if (certStatus.Status != CertStatus.Unrevoked)
 					{
-						// TODO This format is forced by the NistCertPath tests
-						string formattedDate = certStatus.RevocationDate.Value.ToString(
-                            "G", new CultureInfo("en-us"));
-						string message = "Attribute certificate revocation after "
+                        // This format is enforced by the NistCertPath tests
+                        string formattedDate = certStatus.RevocationDate.Value.ToString(
+                            "ddd MMM dd HH:mm:ss K yyyy");
+                        string message = "Attribute certificate revocation after "
 							+ formattedDate;
 						message += ", reason: "
 							+ Rfc3280CertPathUtilities.CrlReasons[certStatus.Status];
diff --git a/crypto/test/src/test/nist/NistCertPathTest.cs b/crypto/test/src/test/nist/NistCertPathTest.cs
index f42f64ca2..fed98a778 100644
--- a/crypto/test/src/test/nist/NistCertPathTest.cs
+++ b/crypto/test/src/test/nist/NistCertPathTest.cs
@@ -185,7 +185,7 @@ namespace Org.BouncyCastle.Tests.Nist
 				new string[] { "NegativeSerialNumberCACert", "InvalidNegativeSerialNumberTest15EE" },
 				new string[] { TRUST_ANCHOR_ROOT_CRL, "NegativeSerialNumberCACRL" },
 				0,
-				"Certificate revocation after 4/19/2001 2:57:20 PM",
+				"Certificate revocation after Thu Apr 19 14:57:20",
 				"reason: keyCompromise");
 		}