From 8d01bdcfcb8be68b6d2aa0f77a17ca6ac046993c Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sun, 29 Dec 2013 11:24:03 +0700 Subject: Make date format consistent with Java tests --- crypto/src/pkix/Rfc3280CertPathUtilities.cs | 8 ++++---- crypto/src/pkix/Rfc3281CertPathUtilities.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'crypto/src/pkix') 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]; -- cgit 1.5.1