diff options
Diffstat (limited to 'crypto/src/asn1/cms/CompressedData.cs')
-rw-r--r-- | crypto/src/asn1/cms/CompressedData.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/src/asn1/cms/CompressedData.cs b/crypto/src/asn1/cms/CompressedData.cs index e6ca41687..4b326247e 100644 --- a/crypto/src/asn1/cms/CompressedData.cs +++ b/crypto/src/asn1/cms/CompressedData.cs @@ -1,3 +1,5 @@ +using System; + using Org.BouncyCastle.Asn1.X509; namespace Org.BouncyCastle.Asn1.Cms @@ -21,12 +23,16 @@ namespace Org.BouncyCastle.Asn1.Cms return null; if (obj is CompressedData compressedData) return compressedData; +#pragma warning disable CS0618 // Type or member is obsolete return new CompressedData(Asn1Sequence.GetInstance(obj)); +#pragma warning restore CS0618 // Type or member is obsolete } public static CompressedData GetInstance(Asn1TaggedObject ato, bool explicitly) { +#pragma warning disable CS0618 // Type or member is obsolete return new CompressedData(Asn1Sequence.GetInstance(ato, explicitly)); +#pragma warning restore CS0618 // Type or member is obsolete } private DerInteger version; @@ -42,7 +48,8 @@ namespace Org.BouncyCastle.Asn1.Cms this.encapContentInfo = encapContentInfo; } - public CompressedData( + [Obsolete("Use 'GetInstance' instead")] + public CompressedData( Asn1Sequence seq) { this.version = (DerInteger) seq[0]; |