From 045e65c688059037bbf5a2c4ac8bc9943dac82d6 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Thu, 5 May 2022 14:05:40 +0700 Subject: Change method to property --- crypto/src/tls/TlsUtilities.cs | 12 ++++++------ crypto/src/tls/crypto/TlsStreamSigner.cs | 2 +- crypto/src/tls/crypto/TlsStreamVerifier.cs | 2 +- crypto/src/tls/crypto/impl/bc/BcTlsStreamSigner.cs | 4 ++-- crypto/src/tls/crypto/impl/bc/BcTlsStreamVerifier.cs | 4 ++-- crypto/src/tls/crypto/impl/bc/BcVerifyingStreamSigner.cs | 4 ++-- crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs | 12 ++++++------ 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/crypto/src/tls/TlsUtilities.cs b/crypto/src/tls/TlsUtilities.cs index 8e5b02216..13155d26e 100644 --- a/crypto/src/tls/TlsUtilities.cs +++ b/crypto/src/tls/TlsUtilities.cs @@ -2144,7 +2144,7 @@ namespace Org.BouncyCastle.Tls byte[] signature; if (streamSigner != null) { - handshakeHash.CopyBufferTo(streamSigner.GetOutputStream()); + handshakeHash.CopyBufferTo(streamSigner.Stream); signature = streamSigner.GetSignature(); } else @@ -2195,7 +2195,7 @@ namespace Org.BouncyCastle.Tls if (null != streamSigner) { - Stream output = streamSigner.GetOutputStream(); + Stream output = streamSigner.Stream; output.Write(header, 0, header.Length); output.Write(prfHash, 0, prfHash.Length); return streamSigner.GetSignature(); @@ -2246,7 +2246,7 @@ namespace Org.BouncyCastle.Tls if (streamVerifier != null) { - handshakeHash.CopyBufferTo(streamVerifier.GetOutputStream()); + handshakeHash.CopyBufferTo(streamVerifier.Stream); verified = streamVerifier.IsVerified(); } else @@ -2364,7 +2364,7 @@ namespace Org.BouncyCastle.Tls if (null != streamVerifier) { - Stream output = streamVerifier.GetOutputStream(); + Stream output = streamVerifier.Stream; output.Write(header, 0, header.Length); output.Write(prfHash, 0, prfHash.Length); return streamVerifier.IsVerified(); @@ -2410,7 +2410,7 @@ namespace Org.BouncyCastle.Tls byte[] signature; if (streamSigner != null) { - SendSignatureInput(context, extraSignatureInput, digestBuffer, streamSigner.GetOutputStream()); + SendSignatureInput(context, extraSignatureInput, digestBuffer, streamSigner.Stream); signature = streamSigner.GetSignature(); } else @@ -2456,7 +2456,7 @@ namespace Org.BouncyCastle.Tls bool verified; if (streamVerifier != null) { - SendSignatureInput(context, null, digestBuffer, streamVerifier.GetOutputStream()); + SendSignatureInput(context, null, digestBuffer, streamVerifier.Stream); verified = streamVerifier.IsVerified(); } else diff --git a/crypto/src/tls/crypto/TlsStreamSigner.cs b/crypto/src/tls/crypto/TlsStreamSigner.cs index 8f79346bf..c3634fe27 100644 --- a/crypto/src/tls/crypto/TlsStreamSigner.cs +++ b/crypto/src/tls/crypto/TlsStreamSigner.cs @@ -6,7 +6,7 @@ namespace Org.BouncyCastle.Tls.Crypto public interface TlsStreamSigner { /// - Stream GetOutputStream(); + Stream Stream { get; } /// byte[] GetSignature(); diff --git a/crypto/src/tls/crypto/TlsStreamVerifier.cs b/crypto/src/tls/crypto/TlsStreamVerifier.cs index 9d18a9c9c..33b0e3879 100644 --- a/crypto/src/tls/crypto/TlsStreamVerifier.cs +++ b/crypto/src/tls/crypto/TlsStreamVerifier.cs @@ -6,7 +6,7 @@ namespace Org.BouncyCastle.Tls.Crypto public interface TlsStreamVerifier { /// - Stream GetOutputStream(); + Stream Stream { get; } /// bool IsVerified(); diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsStreamSigner.cs b/crypto/src/tls/crypto/impl/bc/BcTlsStreamSigner.cs index 158fb053e..21db0af8e 100644 --- a/crypto/src/tls/crypto/impl/bc/BcTlsStreamSigner.cs +++ b/crypto/src/tls/crypto/impl/bc/BcTlsStreamSigner.cs @@ -16,9 +16,9 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC this.m_output = new SignerSink(signer); } - public Stream GetOutputStream() + public Stream Stream { - return m_output; + get { return m_output; } } public byte[] GetSignature() diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsStreamVerifier.cs b/crypto/src/tls/crypto/impl/bc/BcTlsStreamVerifier.cs index 0848a30dd..edf13e6ec 100644 --- a/crypto/src/tls/crypto/impl/bc/BcTlsStreamVerifier.cs +++ b/crypto/src/tls/crypto/impl/bc/BcTlsStreamVerifier.cs @@ -18,9 +18,9 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC this.m_signature = signature; } - public Stream GetOutputStream() + public Stream Stream { - return m_output; + get { return m_output; } } public bool IsVerified() diff --git a/crypto/src/tls/crypto/impl/bc/BcVerifyingStreamSigner.cs b/crypto/src/tls/crypto/impl/bc/BcVerifyingStreamSigner.cs index 4d9506857..4093fc52f 100644 --- a/crypto/src/tls/crypto/impl/bc/BcVerifyingStreamSigner.cs +++ b/crypto/src/tls/crypto/impl/bc/BcVerifyingStreamSigner.cs @@ -24,9 +24,9 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC this.m_output = new TeeOutputStream(outputSigner, outputVerifier); } - public Stream GetOutputStream() + public Stream Stream { - return m_output; + get { return m_output; } } public byte[] GetSignature() diff --git a/crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs b/crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs index e0bd39f64..494175261 100644 --- a/crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs +++ b/crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs @@ -657,7 +657,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Tests TlsStreamSigner tlsStreamSigner = credentialedSigner.GetStreamSigner(); if (null != tlsStreamSigner) { - Stream output = tlsStreamSigner.GetOutputStream(); + Stream output = tlsStreamSigner.Stream; output.Write(message, 0, message.Length); signature = tlsStreamSigner.GetSignature(); } @@ -678,7 +678,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Tests TlsStreamVerifier tlsStreamVerifier = tlsVerifier.GetStreamVerifier(digitallySigned); if (null != tlsStreamVerifier) { - Stream output = tlsStreamVerifier.GetOutputStream(); + Stream output = tlsStreamVerifier.Stream; output.Write(message, 0, message.Length); verified = tlsStreamVerifier.IsVerified(); } @@ -702,7 +702,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Tests TlsStreamSigner tlsStreamSigner = credentialedSigner.GetStreamSigner(); if (null != tlsStreamSigner) { - Stream output = tlsStreamSigner.GetOutputStream(); + Stream output = tlsStreamSigner.Stream; output.Write(message, 0, message.Length); signature = tlsStreamSigner.GetSignature(); } @@ -721,7 +721,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Tests TlsStreamVerifier tlsStreamVerifier = tlsVerifier.GetStreamVerifier(digitallySigned); if (null != tlsStreamVerifier) { - Stream output = tlsStreamVerifier.GetOutputStream(); + Stream output = tlsStreamVerifier.Stream; output.Write(message, 0, message.Length); verified = tlsStreamVerifier.IsVerified(); } @@ -742,7 +742,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Tests TlsStreamSigner tlsStreamSigner = credentialedSigner.GetStreamSigner(); if (null != tlsStreamSigner) { - Stream output = tlsStreamSigner.GetOutputStream(); + Stream output = tlsStreamSigner.Stream; output.Write(message, 0, message.Length); signature = tlsStreamSigner.GetSignature(); } @@ -762,7 +762,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Tests TlsStreamVerifier tlsStreamVerifier = tlsVerifier.GetStreamVerifier(digitallySigned); if (null != tlsStreamVerifier) { - Stream output = tlsStreamVerifier.GetOutputStream(); + Stream output = tlsStreamVerifier.Stream; output.Write(message, 0, message.Length); verified = tlsStreamVerifier.IsVerified(); } -- cgit 1.4.1