From 414380883367c5bb2d250da5937f44f742cba281 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 18 Oct 2021 01:39:56 +0700 Subject: PORTABLE fixes --- crypto/src/bcpg/BcpgInputStream.cs | 7 ++++++- crypto/src/tls/HandshakeMessageInput.cs | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'crypto/src') diff --git a/crypto/src/bcpg/BcpgInputStream.cs b/crypto/src/bcpg/BcpgInputStream.cs index 38b5382ad..5efef193a 100644 --- a/crypto/src/bcpg/BcpgInputStream.cs +++ b/crypto/src/bcpg/BcpgInputStream.cs @@ -196,7 +196,12 @@ namespace Org.BouncyCastle.Bcpg else { PartialInputStream pis = new PartialInputStream(this, partial, bodyLen); - objStream = new BcpgInputStream(new BufferedStream(pis)); +#if NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE + Stream buf = pis; +#else + Stream buf = new BufferedStream(pis); +#endif + objStream = new BcpgInputStream(buf); } switch (tag) diff --git a/crypto/src/tls/HandshakeMessageInput.cs b/crypto/src/tls/HandshakeMessageInput.cs index c15112cc0..8d9a291d7 100644 --- a/crypto/src/tls/HandshakeMessageInput.cs +++ b/crypto/src/tls/HandshakeMessageInput.cs @@ -13,7 +13,11 @@ namespace Org.BouncyCastle.Tls private readonly int m_offset; internal HandshakeMessageInput(byte[] buf, int offset, int length) +#if PORTABLE + : base(buf, offset, length, false) +#else : base(buf, offset, length, false, true) +#endif { #if PORTABLE this.m_offset = 0; -- cgit 1.5.1