summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-01-05 13:29:15 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-01-05 13:29:15 +0700
commitc86b2ce3dcf86b4b7d1286ea3686f89aea2bbbe7 (patch)
tree280568e73c8770d8e2fe66b16388dcb6e38c8ce8 /crypto/src
parentFix comment (diff)
downloadBouncyCastle.NET-ed25519-c86b2ce3dcf86b4b7d1286ea3686f89aea2bbbe7.tar.xz
Refactor SendSignatureInput and callers
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/tls/TlsUtilities.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/src/tls/TlsUtilities.cs b/crypto/src/tls/TlsUtilities.cs

index 424fca133..4a89d6708 100644 --- a/crypto/src/tls/TlsUtilities.cs +++ b/crypto/src/tls/TlsUtilities.cs
@@ -2157,8 +2157,6 @@ namespace Org.BouncyCastle.Tls } buf.CopyInputTo(output); - - output.Dispose(); } internal static DigitallySigned GenerateCertificateVerifyClient(TlsClientContext clientContext, @@ -2399,7 +2397,10 @@ namespace Org.BouncyCastle.Tls byte[] signature; if (streamSigner != null) { - SendSignatureInput(context, extraSignatureInput, digestBuffer, streamSigner.Stream); + using (var output = streamSigner.Stream) + { + SendSignatureInput(context, extraSignatureInput, digestBuffer, output); + } signature = streamSigner.GetSignature(); } else @@ -2445,7 +2446,10 @@ namespace Org.BouncyCastle.Tls bool verified; if (streamVerifier != null) { - SendSignatureInput(context, null, digestBuffer, streamVerifier.Stream); + using (var output = streamVerifier.Stream) + { + SendSignatureInput(context, null, digestBuffer, output); + } verified = streamVerifier.IsVerified(); } else