summary refs log tree commit diff
path: root/crypto/src/asn1/x509/Time.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/x509/Time.cs')
-rw-r--r--crypto/src/asn1/x509/Time.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/src/asn1/x509/Time.cs b/crypto/src/asn1/x509/Time.cs
index efdf63850..791f08053 100644
--- a/crypto/src/asn1/x509/Time.cs
+++ b/crypto/src/asn1/x509/Time.cs
@@ -22,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.X509
         {
             if (time == null)
                 throw new ArgumentNullException("time");
-            if (!(time is DerUtcTime) && !(time is DerGeneralizedTime))
+            if (!(time is DerUtcTime) && !(time is Asn1GeneralizedTime))
                 throw new ArgumentException("unknown object passed to Time");
 
             this.time = time;
@@ -56,8 +56,8 @@ namespace Org.BouncyCastle.Asn1.X509
                 return (Time)obj;
             if (obj is DerUtcTime)
                 return new Time((DerUtcTime)obj);
-            if (obj is DerGeneralizedTime)
-                return new Time((DerGeneralizedTime)obj);
+            if (obj is Asn1GeneralizedTime)
+                return new Time((Asn1GeneralizedTime)obj);
 
             throw new ArgumentException("unknown object in factory: " + Platform.GetTypeName(obj), "obj");
         }
@@ -66,10 +66,10 @@ namespace Org.BouncyCastle.Asn1.X509
         {
             if (time is DerUtcTime)
             {
-                return ((DerUtcTime) time).AdjustedTimeString;
+                return ((DerUtcTime)time).AdjustedTimeString;
             }
 
-            return ((DerGeneralizedTime) time).GetTime();
+            return ((Asn1GeneralizedTime)time).GetTime();
         }
 
         /// <summary>
@@ -86,7 +86,7 @@ namespace Org.BouncyCastle.Asn1.X509
                 }
                 else
                 {
-                    return ((DerGeneralizedTime)time).ToDateTime();
+                    return ((Asn1GeneralizedTime)time).ToDateTime();
                 }
             }
             catch (FormatException e)