diff options
author | mw <megan@cryptoworkshop.com> | 2020-10-27 16:31:51 +1100 |
---|---|---|
committer | mw <megan@cryptoworkshop.com> | 2020-10-27 16:31:51 +1100 |
commit | b290b56d91ab7ee85198b2be77925fca9f037ac8 (patch) | |
tree | e3b377c06b354a8778d9519e12d93167ee876169 /crypto/src/asn1 | |
parent | Added fractional time and new tests (diff) | |
download | BouncyCastle.NET-ed25519-b290b56d91ab7ee85198b2be77925fca9f037ac8.tar.xz |
Finished NewTspTests
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r-- | crypto/src/asn1/x509/X509ExtensionsGenerator.cs | 13 |
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); + } + } } |