summary refs log tree commit diff
path: root/crypto/src/asn1/LazyDERSet.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/LazyDERSet.cs')
-rw-r--r--crypto/src/asn1/LazyDERSet.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/src/asn1/LazyDERSet.cs b/crypto/src/asn1/LazyDERSet.cs
index ae56f5e50..32d9e2691 100644
--- a/crypto/src/asn1/LazyDERSet.cs
+++ b/crypto/src/asn1/LazyDERSet.cs
@@ -59,6 +59,21 @@ namespace Org.BouncyCastle.Asn1
             }
         }
 
+        internal override int EncodedLength(bool withID)
+        {
+            lock (this)
+            {
+                if (encoded == null)
+                {
+                    return base.EncodedLength(withID);
+                }
+                else
+                {
+                    return Asn1OutputStream.GetLengthOfEncodingDL(withID, encoded.Length);
+                }
+            }
+        }
+
         internal override void Encode(Asn1OutputStream asn1Out, bool withID)
         {
             lock (this)