summary refs log tree commit diff
path: root/crypto/src/asn1/isismtt
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-02-17 17:58:20 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-02-17 17:58:20 +0700
commite3d12a2c33a7a9d0f371e1d5ff07f7ab7a3eb7ae (patch)
treea0a855afdfbfe6a4cc8a5b026f9b815ee7147d4b /crypto/src/asn1/isismtt
parentRefactoring in Cms (diff)
downloadBouncyCastle.NET-ed25519-e3d12a2c33a7a9d0f371e1d5ff07f7ab7a3eb7ae.tar.xz
Refactoring around Asn1EncodableVector
Diffstat (limited to 'crypto/src/asn1/isismtt')
-rw-r--r--crypto/src/asn1/isismtt/x509/AdmissionSyntax.cs2
-rw-r--r--crypto/src/asn1/isismtt/x509/Admissions.cs2
-rw-r--r--crypto/src/asn1/isismtt/x509/NamingAuthority.cs2
-rw-r--r--crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs2
-rw-r--r--crypto/src/asn1/isismtt/x509/ProfessionInfo.cs2
5 files changed, 5 insertions, 5 deletions
diff --git a/crypto/src/asn1/isismtt/x509/AdmissionSyntax.cs b/crypto/src/asn1/isismtt/x509/AdmissionSyntax.cs
index a45075ee4..eac5d9a1a 100644
--- a/crypto/src/asn1/isismtt/x509/AdmissionSyntax.cs
+++ b/crypto/src/asn1/isismtt/x509/AdmissionSyntax.cs
@@ -243,7 +243,7 @@ namespace Org.BouncyCastle.Asn1.IsisMtt.X509
         */
         public override Asn1Object ToAsn1Object()
         {
-            Asn1EncodableVector v = new Asn1EncodableVector();
+            Asn1EncodableVector v = new Asn1EncodableVector(2);
             v.AddOptional(admissionAuthority);
             v.Add(contentsOfAdmissions);
             return new DerSequence(v);
diff --git a/crypto/src/asn1/isismtt/x509/Admissions.cs b/crypto/src/asn1/isismtt/x509/Admissions.cs
index 1ade6093f..57c5a6183 100644
--- a/crypto/src/asn1/isismtt/x509/Admissions.cs
+++ b/crypto/src/asn1/isismtt/x509/Admissions.cs
@@ -160,7 +160,7 @@ namespace Org.BouncyCastle.Asn1.IsisMtt.X509
 		*/
 		public override Asn1Object ToAsn1Object()
 		{
-			Asn1EncodableVector v = new Asn1EncodableVector();
+			Asn1EncodableVector v = new Asn1EncodableVector(3);
             v.AddOptionalTagged(true, 0, admissionAuthority);
             v.AddOptionalTagged(true, 1, namingAuthority);
 			v.Add(professionInfos);
diff --git a/crypto/src/asn1/isismtt/x509/NamingAuthority.cs b/crypto/src/asn1/isismtt/x509/NamingAuthority.cs
index 78ef25654..3c3f0a5f5 100644
--- a/crypto/src/asn1/isismtt/x509/NamingAuthority.cs
+++ b/crypto/src/asn1/isismtt/x509/NamingAuthority.cs
@@ -187,7 +187,7 @@ namespace Org.BouncyCastle.Asn1.IsisMtt.X509
 		*/
 		public override Asn1Object ToAsn1Object()
 		{
-			Asn1EncodableVector v = new Asn1EncodableVector();
+			Asn1EncodableVector v = new Asn1EncodableVector(3);
             v.AddOptional(namingAuthorityID);
 
 			if (namingAuthorityUrl != null)
diff --git a/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs b/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs
index 23be2d388..2fb7323c6 100644
--- a/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs
+++ b/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs
@@ -202,7 +202,7 @@ namespace Org.BouncyCastle.Asn1.IsisMtt.X509
 		*/
 		public override Asn1Object ToAsn1Object()
 		{
-            Asn1EncodableVector v = new Asn1EncodableVector();
+            Asn1EncodableVector v = new Asn1EncodableVector(3);
 
             if (country != null)
             {
diff --git a/crypto/src/asn1/isismtt/x509/ProfessionInfo.cs b/crypto/src/asn1/isismtt/x509/ProfessionInfo.cs
index daa76730d..32ad31d9a 100644
--- a/crypto/src/asn1/isismtt/x509/ProfessionInfo.cs
+++ b/crypto/src/asn1/isismtt/x509/ProfessionInfo.cs
@@ -296,7 +296,7 @@ namespace Org.BouncyCastle.Asn1.IsisMtt.X509
 		*/
         public override Asn1Object ToAsn1Object()
         {
-            Asn1EncodableVector v = new Asn1EncodableVector();
+            Asn1EncodableVector v = new Asn1EncodableVector(5);
             v.AddOptionalTagged(true, 0, namingAuthority);
             v.Add(professionItems);
             v.AddOptional(professionOids);