summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorOren Novotny <oren@novotny.org>2014-08-27 10:18:03 -0400
committerOren Novotny <oren@novotny.org>2014-08-27 10:18:03 -0400
commit95f157f9bd915d652dea06730b36391c19b60e87 (patch)
tree664e56f22aa2d54e6d75f4001a271c267e343242 /crypto/src/asn1
parentAdd assm ver (diff)
downloadBouncyCastle.NET-ed25519-95f157f9bd915d652dea06730b36391c19b60e87.tar.xz
Fix remaining compile errors
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/BEROctetStringGenerator.cs23
-rw-r--r--crypto/src/asn1/DerGeneralizedTime.cs12
-rw-r--r--crypto/src/asn1/util/Dump.cs2
3 files changed, 17 insertions, 20 deletions
diff --git a/crypto/src/asn1/BEROctetStringGenerator.cs b/crypto/src/asn1/BEROctetStringGenerator.cs
index 7468a6b0b..6d7d1b66e 100644
--- a/crypto/src/asn1/BEROctetStringGenerator.cs
+++ b/crypto/src/asn1/BEROctetStringGenerator.cs
@@ -102,16 +102,19 @@ namespace Org.BouncyCastle.Asn1
 				}
 			}
 
-			public override void Close()
-			{
-				if (_off != 0)
-				{
-					DerOctetString.Encode(_derOut, _buf, 0, _off);
-				}
-
-				_gen.WriteBerEnd();
-				base.Close();
-			}
+		    protected override void Dispose(bool disposing)
+		    {
+		        if (disposing)
+		        {
+                    if (_off != 0)
+                    {
+                        DerOctetString.Encode(_derOut, _buf, 0, _off);
+                    }
+
+                    _gen.WriteBerEnd();
+		        }
+		        base.Dispose(disposing);
+		    }
 		}
 	}
 }
diff --git a/crypto/src/asn1/DerGeneralizedTime.cs b/crypto/src/asn1/DerGeneralizedTime.cs
index 548a268e1..9a125ff3b 100644
--- a/crypto/src/asn1/DerGeneralizedTime.cs
+++ b/crypto/src/asn1/DerGeneralizedTime.cs
@@ -259,19 +259,11 @@ namespace Org.BouncyCastle.Asn1
 
         private DateTime ParseDateString(string	s, string format, bool makeUniversal)
         {
-            /*
-             * NOTE: DateTime.Kind and DateTimeStyles.AssumeUniversal not available in .NET 1.1
-             */
             DateTimeStyles style = DateTimeStyles.None;
             if (format.EndsWith("Z"))
             {
-                try
-                {
-                    style = (DateTimeStyles)Enum.Parse(typeof(DateTimeStyles), "AssumeUniversal");
-                }
-                catch (Exception)
-                {
-                }
+                style = DateTimeStyles.AssumeUniversal;
+                
 
                 style |= DateTimeStyles.AdjustToUniversal;
             }
diff --git a/crypto/src/asn1/util/Dump.cs b/crypto/src/asn1/util/Dump.cs
index 27c87f127..164ed982f 100644
--- a/crypto/src/asn1/util/Dump.cs
+++ b/crypto/src/asn1/util/Dump.cs
@@ -1,3 +1,4 @@
+#if !PCL
 using Org.BouncyCastle.Asn1;
 
 using System;
@@ -26,3 +27,4 @@ namespace Org.BouncyCastle.Asn1.Utilities
         }
     }
 }
+#endif