summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorOren Novotny <oren@novotny.org>2014-08-26 22:05:11 -0400
committerOren Novotny <oren@novotny.org>2014-08-26 22:05:11 -0400
commit92f85dc4a4b4b0127c791ea6d8732bd2de53289e (patch)
treed20ab79e4da9d7bc932efccc01f825617b302e30 /crypto/src/asn1
parentConvert proj back to PCL (diff)
downloadBouncyCastle.NET-ed25519-92f85dc4a4b4b0127c791ea6d8732bd2de53289e.tar.xz
Initial re-migration from original code
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/DerSequence.cs2
-rw-r--r--crypto/src/asn1/DerSet.cs2
-rw-r--r--crypto/src/asn1/util/FilterStream.cs10
3 files changed, 10 insertions, 4 deletions
diff --git a/crypto/src/asn1/DerSequence.cs b/crypto/src/asn1/DerSequence.cs
index b50a77962..1a86dc429 100644
--- a/crypto/src/asn1/DerSequence.cs
+++ b/crypto/src/asn1/DerSequence.cs
@@ -75,7 +75,7 @@ namespace Org.BouncyCastle.Asn1
 				dOut.WriteObject(obj);
 			}
 
-			dOut.Close();
+            dOut.Dispose();
 
 			byte[] bytes = bOut.ToArray();
 
diff --git a/crypto/src/asn1/DerSet.cs b/crypto/src/asn1/DerSet.cs
index c66dde8c7..6d3f438bd 100644
--- a/crypto/src/asn1/DerSet.cs
+++ b/crypto/src/asn1/DerSet.cs
@@ -98,7 +98,7 @@ namespace Org.BouncyCastle.Asn1
 				dOut.WriteObject(obj);
 			}
 
-			dOut.Close();
+            dOut.Dispose();
 
 			byte[] bytes = bOut.ToArray();
 
diff --git a/crypto/src/asn1/util/FilterStream.cs b/crypto/src/asn1/util/FilterStream.cs
index 2b0494b78..2b22856a6 100644
--- a/crypto/src/asn1/util/FilterStream.cs
+++ b/crypto/src/asn1/util/FilterStream.cs
@@ -30,10 +30,16 @@ namespace Org.BouncyCastle.Asn1.Utilities
             get { return s.Position; }
             set { s.Position = value; }
         }
-        public override void Close()
+
+        protected override void Dispose(bool disposing)
         {
-            s.Close();
+            if (disposing)
+            {
+                s.Dispose();
+            }
+            base.Dispose(disposing);
         }
+
         public override void Flush()
         {
             s.Flush();