summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-11-08 10:15:13 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-11-08 10:15:13 +0700
commit123ced5eeeb6ea5a7aa4c3af02f89081caec949c (patch)
treea738737570c892c8f2ae1661bcac2b4c6c926369
parentWhitespace (diff)
downloadBouncyCastle.NET-ed25519-123ced5eeeb6ea5a7aa4c3af02f89081caec949c.tar.xz
AddOptional can take varargs
-rw-r--r--crypto/src/asn1/cmp/CertResponse.cs3
-rw-r--r--crypto/src/asn1/cmp/ErrorMsgContent.cs3
-rw-r--r--crypto/src/asn1/crmf/CertReqMsg.cs3
3 files changed, 3 insertions, 6 deletions
diff --git a/crypto/src/asn1/cmp/CertResponse.cs b/crypto/src/asn1/cmp/CertResponse.cs
index 246b8ce70..80813b8b7 100644
--- a/crypto/src/asn1/cmp/CertResponse.cs
+++ b/crypto/src/asn1/cmp/CertResponse.cs
@@ -107,8 +107,7 @@ namespace Org.BouncyCastle.Asn1.Cmp
 		public override Asn1Object ToAsn1Object()
 		{
 			Asn1EncodableVector v = new Asn1EncodableVector(certReqId, status);
-			v.AddOptional(certifiedKeyPair);
-			v.AddOptional(rspInfo);
+			v.AddOptional(certifiedKeyPair, rspInfo);
 			return new DerSequence(v);
 		}
 	}
diff --git a/crypto/src/asn1/cmp/ErrorMsgContent.cs b/crypto/src/asn1/cmp/ErrorMsgContent.cs
index f4dc584ea..2d6353b65 100644
--- a/crypto/src/asn1/cmp/ErrorMsgContent.cs
+++ b/crypto/src/asn1/cmp/ErrorMsgContent.cs
@@ -86,8 +86,7 @@ namespace Org.BouncyCastle.Asn1.Cmp
 		public override Asn1Object ToAsn1Object()
 		{
 			Asn1EncodableVector v = new Asn1EncodableVector(pkiStatusInfo);
-			v.AddOptional(errorCode);
-			v.AddOptional(errorDetails);
+			v.AddOptional(errorCode, errorDetails);
 			return new DerSequence(v);
 		}
 	}
diff --git a/crypto/src/asn1/crmf/CertReqMsg.cs b/crypto/src/asn1/crmf/CertReqMsg.cs
index 2ca319a57..20fd4179a 100644
--- a/crypto/src/asn1/crmf/CertReqMsg.cs
+++ b/crypto/src/asn1/crmf/CertReqMsg.cs
@@ -98,8 +98,7 @@ namespace Org.BouncyCastle.Asn1.Crmf
         public override Asn1Object ToAsn1Object()
         {
             Asn1EncodableVector v = new Asn1EncodableVector(certReq);
-            v.AddOptional(popo);
-            v.AddOptional(regInfo);
+            v.AddOptional(popo, regInfo);
             return new DerSequence(v);
         }
     }