summary refs log tree commit diff
path: root/crypto/src/asn1/cmp/ProtectedPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/cmp/ProtectedPart.cs')
-rw-r--r--crypto/src/asn1/cmp/ProtectedPart.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/src/asn1/cmp/ProtectedPart.cs b/crypto/src/asn1/cmp/ProtectedPart.cs
index 863a85e17..e6b6311df 100644
--- a/crypto/src/asn1/cmp/ProtectedPart.cs
+++ b/crypto/src/asn1/cmp/ProtectedPart.cs
@@ -14,7 +14,7 @@ namespace Org.BouncyCastle.Asn1.Cmp
 
         public static ProtectedPart GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
         {
-            return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+            return new ProtectedPart(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
         }
 
         private readonly PkiHeader m_header;
@@ -45,9 +45,6 @@ namespace Org.BouncyCastle.Asn1.Cmp
 		 * </pre>
 		 * @return a basic ASN.1 object representation.
 		 */
-		public override Asn1Object ToAsn1Object()
-		{
-			return new DerSequence(m_header, m_body);
-		}
+		public override Asn1Object ToAsn1Object() => new DerSequence(m_header, m_body);
 	}
 }