summary refs log tree commit diff
path: root/crypto/src/cmp
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-29 20:55:57 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-29 20:55:57 +0700
commite049cab36e9e68adff298acc24acdaa2551f72ef (patch)
treee772d623791461cba50b1eba3bbd4f833f893ae9 /crypto/src/cmp
parentAdd Objects class (diff)
downloadBouncyCastle.NET-ed25519-e049cab36e9e68adff298acc24acdaa2551f72ef.tar.xz
Refactoring around Stream signers
Diffstat (limited to 'crypto/src/cmp')
-rw-r--r--crypto/src/cmp/ProtectedPkiMessageBuilder.cs6
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/src/cmp/ProtectedPkiMessageBuilder.cs b/crypto/src/cmp/ProtectedPkiMessageBuilder.cs
index 269910cc6..6440c3f4e 100644
--- a/crypto/src/cmp/ProtectedPkiMessageBuilder.cs
+++ b/crypto/src/cmp/ProtectedPkiMessageBuilder.cs
@@ -145,11 +145,7 @@ namespace Org.BouncyCastle.Cmp
 
         private byte[] CalculateSignature(IStreamCalculator signer, PkiHeader header, PkiBody body)
         {
-            Asn1EncodableVector avec = new Asn1EncodableVector(2);
-            avec.Add(header);
-            avec.Add(body);
-
-            new DerSequence(avec).EncodeTo(signer.Stream);
+            new DerSequence(header, body).EncodeTo(signer.Stream);
             object result = signer.GetResult();
 
             if (result is DefaultSignatureResult sigResult)