summary refs log tree commit diff
path: root/crypto/src/asn1/cms/KeyTransRecipientInfo.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2024-05-10 19:04:32 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2024-05-10 19:04:32 +0700
commitb48d562bf5c90759559aab53f1a19a4285313a2f (patch)
tree582e7f025d688019371d168c2a287714d46ec2ad /crypto/src/asn1/cms/KeyTransRecipientInfo.cs
parentImprove Asn1OctetString.Asn1Equals (diff)
downloadBouncyCastle.NET-ed25519-b48d562bf5c90759559aab53f1a19a4285313a2f.tar.xz
Obsolete several constructors to make private later
Diffstat (limited to 'crypto/src/asn1/cms/KeyTransRecipientInfo.cs')
-rw-r--r--crypto/src/asn1/cms/KeyTransRecipientInfo.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/src/asn1/cms/KeyTransRecipientInfo.cs b/crypto/src/asn1/cms/KeyTransRecipientInfo.cs
index c33ab8b73..6981e87f9 100644
--- a/crypto/src/asn1/cms/KeyTransRecipientInfo.cs
+++ b/crypto/src/asn1/cms/KeyTransRecipientInfo.cs
@@ -14,12 +14,16 @@ namespace Org.BouncyCastle.Asn1.Cms
                 return null;
             if (obj is KeyTransRecipientInfo keyTransRecipientInfo)
                 return keyTransRecipientInfo;
+#pragma warning disable CS0618 // Type or member is obsolete
             return new KeyTransRecipientInfo(Asn1Sequence.GetInstance(obj));
+#pragma warning restore CS0618 // Type or member is obsolete
         }
 
         public static KeyTransRecipientInfo GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
         {
+#pragma warning disable CS0618 // Type or member is obsolete
             return new KeyTransRecipientInfo(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+#pragma warning restore CS0618 // Type or member is obsolete
         }
 
         private DerInteger          version;
@@ -46,7 +50,8 @@ namespace Org.BouncyCastle.Asn1.Cms
             this.encryptedKey = encryptedKey;
         }
 
-		public KeyTransRecipientInfo(
+        [Obsolete("Use 'GetInstance' instead")]
+        public KeyTransRecipientInfo(
             Asn1Sequence seq)
         {
             this.version = (DerInteger) seq[0];