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