summary refs log tree commit diff
path: root/crypto/src/bcpg
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-10-12 17:27:28 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-10-12 17:27:28 +0700
commitc5065a21286ce0755cee38118b1e288898456f7e (patch)
treee641ffbe5f561c130c39231dd5ee7f4351e03d35 /crypto/src/bcpg
parentcompleted copy constructor in SignerInformation, fixed mutable issue for SET ... (diff)
downloadBouncyCastle.NET-ed25519-c5065a21286ce0755cee38118b1e288898456f7e.tar.xz
Marker packet skipping
Diffstat (limited to 'crypto/src/bcpg')
-rw-r--r--crypto/src/bcpg/BcpgInputStream.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/crypto/src/bcpg/BcpgInputStream.cs b/crypto/src/bcpg/BcpgInputStream.cs
index f9627fde0..3dba953ea 100644
--- a/crypto/src/bcpg/BcpgInputStream.cs
+++ b/crypto/src/bcpg/BcpgInputStream.cs
@@ -247,6 +247,17 @@ namespace Org.BouncyCastle.Bcpg
             }
         }
 
+        public PacketTag SkipMarkerPackets()
+        {
+            PacketTag tag;
+            while ((tag = NextPacketTag()) == PacketTag.Marker)
+            {
+                ReadPacket();
+            }
+
+            return tag;
+        }
+
 #if PORTABLE
         protected override void Dispose(bool disposing)
         {
@@ -257,7 +268,7 @@ namespace Org.BouncyCastle.Bcpg
             base.Dispose(disposing);
         }
 #else
-		public override void Close()
+        public override void Close()
 		{
             Platform.Dispose(m_in);
 			base.Close();