summary refs log tree commit diff
path: root/crypto/src/asn1/util/Dump.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/util/Dump.cs')
-rw-r--r--crypto/src/asn1/util/Dump.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/crypto/src/asn1/util/Dump.cs b/crypto/src/asn1/util/Dump.cs
new file mode 100644
index 000000000..27c87f127
--- /dev/null
+++ b/crypto/src/asn1/util/Dump.cs
@@ -0,0 +1,28 @@
+using Org.BouncyCastle.Asn1;
+
+using System;
+using System.IO;
+
+namespace Org.BouncyCastle.Asn1.Utilities
+{
+    public sealed class Dump
+    {
+        private Dump()
+        {
+        }
+
+        public static void Main(string[] args)
+        {
+            FileStream fIn = File.OpenRead(args[0]);
+            Asn1InputStream bIn = new Asn1InputStream(fIn);
+
+			Asn1Object obj;
+			while ((obj = bIn.ReadObject()) != null)
+            {
+                Console.WriteLine(Asn1Dump.DumpAsString(obj));
+            }
+
+			bIn.Close();
+        }
+    }
+}