summary refs log tree commit diff
path: root/crypto/src/asn1/x509
diff options
context:
space:
mode:
authormw <megan@cryptoworkshop.com>2020-10-27 16:31:51 +1100
committermw <megan@cryptoworkshop.com>2020-10-27 16:31:51 +1100
commitb290b56d91ab7ee85198b2be77925fca9f037ac8 (patch)
treee3b377c06b354a8778d9519e12d93167ee876169 /crypto/src/asn1/x509
parentAdded fractional time and new tests (diff)
downloadBouncyCastle.NET-ed25519-b290b56d91ab7ee85198b2be77925fca9f037ac8.tar.xz
Finished NewTspTests
Diffstat (limited to 'crypto/src/asn1/x509')
-rw-r--r--crypto/src/asn1/x509/X509ExtensionsGenerator.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/crypto/src/asn1/x509/X509ExtensionsGenerator.cs b/crypto/src/asn1/x509/X509ExtensionsGenerator.cs
index d6f567b22..58620ea5e 100644
--- a/crypto/src/asn1/x509/X509ExtensionsGenerator.cs
+++ b/crypto/src/asn1/x509/X509ExtensionsGenerator.cs
@@ -77,5 +77,16 @@ namespace Org.BouncyCastle.Asn1.X509
 		{
 			return new X509Extensions(extOrdering, extensions);
 		}
-	}
+
+        internal void AddExtension(DerObjectIdentifier oid,  X509Extension x509Extension)
+        {
+            if (extensions.Contains(oid))
+            {				
+				throw new ArgumentException  ("extension " + oid + " already added");
+			}
+
+			extOrdering.Add(oid);
+			extensions.Add(oid, x509Extension);
+        }
+    }
 }