From e9e00f6c7536fc7724781cc64b0d906bf7e67e1d Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 15 Oct 2021 15:37:54 +0700 Subject: Replace Obsolete tag --- crypto/src/asn1/BERGenerator.cs | 2 +- crypto/src/asn1/BerTaggedObject.cs | 2 +- crypto/src/asn1/DERGenerator.cs | 4 ++-- crypto/src/asn1/DerTaggedObject.cs | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crypto/src') diff --git a/crypto/src/asn1/BERGenerator.cs b/crypto/src/asn1/BERGenerator.cs index 0b9c43b13..e43d9f80c 100644 --- a/crypto/src/asn1/BERGenerator.cs +++ b/crypto/src/asn1/BERGenerator.cs @@ -60,7 +60,7 @@ namespace Org.BouncyCastle.Asn1 { if (_tagged) { - int tagNum = _tagNo | Asn1Tags.Tagged; + int tagNum = _tagNo | Asn1Tags.ContextSpecific; if (_isExplicit) { diff --git a/crypto/src/asn1/BerTaggedObject.cs b/crypto/src/asn1/BerTaggedObject.cs index b78371856..82a65dba7 100644 --- a/crypto/src/asn1/BerTaggedObject.cs +++ b/crypto/src/asn1/BerTaggedObject.cs @@ -58,7 +58,7 @@ namespace Org.BouncyCastle.Asn1 { if (withID) { - asn1Out.WriteIdentifier(true, Asn1Tags.Constructed | Asn1Tags.Tagged, tagNo); + asn1Out.WriteIdentifier(true, Asn1Tags.Constructed | Asn1Tags.ContextSpecific, tagNo); } asn1Out.WriteByte(0x80); diff --git a/crypto/src/asn1/DERGenerator.cs b/crypto/src/asn1/DERGenerator.cs index aab40fefa..387a2c5f8 100644 --- a/crypto/src/asn1/DERGenerator.cs +++ b/crypto/src/asn1/DERGenerator.cs @@ -71,11 +71,11 @@ namespace Org.BouncyCastle.Asn1 { if (_tagged) { - int tagNum = _tagNo | Asn1Tags.Tagged; + int tagNum = _tagNo | Asn1Tags.ContextSpecific; if (_isExplicit) { - int newTag = _tagNo | Asn1Tags.Constructed | Asn1Tags.Tagged; + int newTag = _tagNo | Asn1Tags.Constructed | Asn1Tags.ContextSpecific; MemoryStream bOut = new MemoryStream(); WriteDerEncoded(bOut, tag, bytes); WriteDerEncoded(Out, newTag, bOut.ToArray()); diff --git a/crypto/src/asn1/DerTaggedObject.cs b/crypto/src/asn1/DerTaggedObject.cs index ea0c91f9a..8a001428b 100644 --- a/crypto/src/asn1/DerTaggedObject.cs +++ b/crypto/src/asn1/DerTaggedObject.cs @@ -59,7 +59,7 @@ namespace Org.BouncyCastle.Asn1 if (explicitly) { - asn1Out.WriteEncodingDL(withID, Asn1Tags.Constructed | Asn1Tags.Tagged, tagNo, bytes); + asn1Out.WriteEncodingDL(withID, Asn1Tags.Constructed | Asn1Tags.ContextSpecific, tagNo, bytes); } else { @@ -68,7 +68,7 @@ namespace Org.BouncyCastle.Asn1 // if (withID) { - int flags = (bytes[0] & Asn1Tags.Constructed) | Asn1Tags.Tagged; + int flags = (bytes[0] & Asn1Tags.Constructed) | Asn1Tags.ContextSpecific; asn1Out.WriteIdentifier(true, flags, tagNo); } @@ -77,7 +77,7 @@ namespace Org.BouncyCastle.Asn1 } else { - asn1Out.WriteEncodingDL(withID, Asn1Tags.Constructed | Asn1Tags.Tagged, tagNo, + asn1Out.WriteEncodingDL(withID, Asn1Tags.Constructed | Asn1Tags.ContextSpecific, tagNo, Asn1OctetString.EmptyOctets); } } -- cgit 1.5.1