summary refs log tree commit diff
path: root/crypto/src/asn1/DERGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/DERGenerator.cs')
-rw-r--r--crypto/src/asn1/DERGenerator.cs4
1 files changed, 2 insertions, 2 deletions
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());