summary refs log tree commit diff
path: root/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs')
-rw-r--r--crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs b/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs
index f42364699..60d3a88e8 100644
--- a/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs
+++ b/crypto/src/asn1/isismtt/x509/ProcurationSyntax.cs
@@ -209,25 +209,25 @@ namespace Org.BouncyCastle.Asn1.IsisMtt.X509
 		*/
 		public override Asn1Object ToAsn1Object()
 		{
-			Asn1EncodableVector vec = new Asn1EncodableVector();
-			if (country != null)
-			{
-				vec.Add(new DerTaggedObject(true, 1, new DerPrintableString(country, true)));
-			}
-			if (typeOfSubstitution != null)
-			{
-				vec.Add(new DerTaggedObject(true, 2, typeOfSubstitution));
-			}
-			if (thirdPerson != null)
-			{
-				vec.Add(new DerTaggedObject(true, 3, thirdPerson));
-			}
-			else
-			{
-				vec.Add(new DerTaggedObject(true, 3, certRef));
-			}
+            Asn1EncodableVector v = new Asn1EncodableVector();
+
+            if (country != null)
+            {
+                v.Add(new DerTaggedObject(true, 1, new DerPrintableString(country, true)));
+            }
+
+            v.AddOptionalTagged(true, 2, typeOfSubstitution);
+
+            if (thirdPerson != null)
+            {
+                v.Add(new DerTaggedObject(true, 3, thirdPerson));
+            }
+            else
+            {
+                v.Add(new DerTaggedObject(true, 3, certRef));
+            }
 
-			return new DerSequence(vec);
+            return new DerSequence(v);
 		}
 	}
 }