summary refs log tree commit diff
path: root/crypto/src/openpgp/PgpPublicKeyRingBundle.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/openpgp/PgpPublicKeyRingBundle.cs')
-rw-r--r--crypto/src/openpgp/PgpPublicKeyRingBundle.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/src/openpgp/PgpPublicKeyRingBundle.cs b/crypto/src/openpgp/PgpPublicKeyRingBundle.cs
index 91113e904..08d0aa0a1 100644
--- a/crypto/src/openpgp/PgpPublicKeyRingBundle.cs
+++ b/crypto/src/openpgp/PgpPublicKeyRingBundle.cs
@@ -48,12 +48,13 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
 
 			foreach (object obj in e)
             {
-				PgpPublicKeyRing pgpPub = obj as PgpPublicKeyRing;
+                // Marker packets must be ignored
+                if (obj is PgpMarker)
+                    continue;
 
+                PgpPublicKeyRing pgpPub = obj as PgpPublicKeyRing;
 				if (pgpPub == null)
-				{
 					throw new PgpException(Platform.GetTypeName(obj) + " found where PgpPublicKeyRing expected");
-				}
 
 				long key = pgpPub.GetPublicKey().KeyId;
                 pubRings.Add(key, pgpPub);