summary refs log tree commit diff
path: root/crypto/src/asn1/cmp/GenMsgContent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/cmp/GenMsgContent.cs')
-rw-r--r--crypto/src/asn1/cmp/GenMsgContent.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/crypto/src/asn1/cmp/GenMsgContent.cs b/crypto/src/asn1/cmp/GenMsgContent.cs
index 11c0c8b3b..378f8e5d6 100644
--- a/crypto/src/asn1/cmp/GenMsgContent.cs
+++ b/crypto/src/asn1/cmp/GenMsgContent.cs
@@ -17,7 +17,7 @@ namespace Org.BouncyCastle.Asn1.Cmp
 
         public static GenMsgContent GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
         {
-            return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+            return new GenMsgContent(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
         }
 
         private readonly Asn1Sequence m_content;
@@ -37,10 +37,8 @@ namespace Org.BouncyCastle.Asn1.Cmp
 			m_content = new DerSequence(itvs);
 		}
 
-		public virtual InfoTypeAndValue[] ToInfoTypeAndValueArray()
-		{
-			return m_content.MapElements(InfoTypeAndValue.GetInstance);
-		}
+		public virtual InfoTypeAndValue[] ToInfoTypeAndValueArray() =>
+            m_content.MapElements(InfoTypeAndValue.GetInstance);
 
 		/**
 		 * <pre>
@@ -48,9 +46,6 @@ namespace Org.BouncyCastle.Asn1.Cmp
 		 * </pre>
 		 * @return a basic ASN.1 object representation.
 		 */
-		public override Asn1Object ToAsn1Object()
-		{
-			return m_content;
-		}
+		public override Asn1Object ToAsn1Object() => m_content;
 	}
 }