diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-01-28 18:57:30 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-01-28 18:57:30 +0700 |
commit | 558aef70537b3882e5616e9d0e7b40d971e2dd42 (patch) | |
tree | 1ac43c975f414e69a268dca315a10a87fa406ea8 /crypto/src/cmp/ProtectedPkiMessage.cs | |
parent | Add Xoodyak to the master branch (diff) | |
download | BouncyCastle.NET-ed25519-558aef70537b3882e5616e9d0e7b40d971e2dd42.tar.xz |
Misc. cleanup after bc-fips-csharp updates
Diffstat (limited to 'crypto/src/cmp/ProtectedPkiMessage.cs')
-rw-r--r-- | crypto/src/cmp/ProtectedPkiMessage.cs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/crypto/src/cmp/ProtectedPkiMessage.cs b/crypto/src/cmp/ProtectedPkiMessage.cs index df4c45143..8bc9e4f4d 100644 --- a/crypto/src/cmp/ProtectedPkiMessage.cs +++ b/crypto/src/cmp/ProtectedPkiMessage.cs @@ -137,14 +137,9 @@ namespace Org.BouncyCastle.Cmp private TResult Process<TResult>(IStreamCalculator<TResult> streamCalculator) { - Asn1EncodableVector avec = new Asn1EncodableVector(); - avec.Add(m_pkiMessage.Header); - avec.Add(m_pkiMessage.Body); - byte[] enc = new DerSequence(avec).GetDerEncoded(); - - using (var stream = streamCalculator.Stream) + using (var s = streamCalculator.Stream) { - stream.Write(enc, 0, enc.Length); + new DerSequence(m_pkiMessage.Header, m_pkiMessage.Body).EncodeTo(s, Asn1Encodable.Der); } return streamCalculator.GetResult(); |