From 53a4b3d54e618e62f61c2ca72f56a9088c430135 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 5 Nov 2022 21:06:39 +0700 Subject: Preprocessor symbol cleanup --- crypto/src/cms/CMSProcessableFile.cs | 3 --- crypto/src/openpgp/PgpLiteralDataGenerator.cs | 2 -- crypto/src/tls/DtlsRecordLayer.cs | 4 ---- crypto/src/tls/DtlsTransport.cs | 6 ------ 4 files changed, 15 deletions(-) diff --git a/crypto/src/cms/CMSProcessableFile.cs b/crypto/src/cms/CMSProcessableFile.cs index 9444f885d..255c8432f 100644 --- a/crypto/src/cms/CMSProcessableFile.cs +++ b/crypto/src/cms/CMSProcessableFile.cs @@ -1,5 +1,3 @@ -#if !PORTABLE || DOTNET -using System; using System.IO; using Org.BouncyCastle.Utilities; @@ -42,4 +40,3 @@ namespace Org.BouncyCastle.Cms } } } -#endif diff --git a/crypto/src/openpgp/PgpLiteralDataGenerator.cs b/crypto/src/openpgp/PgpLiteralDataGenerator.cs index 7672659ca..f9a9e7cad 100644 --- a/crypto/src/openpgp/PgpLiteralDataGenerator.cs +++ b/crypto/src/openpgp/PgpLiteralDataGenerator.cs @@ -141,7 +141,6 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp return new WrappedGeneratorStream(this, pkOut); } -#if !PORTABLE || DOTNET /// ///

/// Open a literal data packet for the passed in FileInfo object, returning @@ -163,7 +162,6 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp { return Open(outStr, format, file.Name, file.Length, file.LastWriteTime); } -#endif ///

/// Close the literal data packet - this is equivalent to calling Close() diff --git a/crypto/src/tls/DtlsRecordLayer.cs b/crypto/src/tls/DtlsRecordLayer.cs index b93253146..7ec77c5da 100644 --- a/crypto/src/tls/DtlsRecordLayer.cs +++ b/crypto/src/tls/DtlsRecordLayer.cs @@ -1,8 +1,6 @@ using System; using System.IO; -#if !PORTABLE || DOTNET using System.Net.Sockets; -#endif using Org.BouncyCastle.Tls.Crypto; using Org.BouncyCastle.Utilities; @@ -452,7 +450,6 @@ namespace Org.BouncyCastle.Tls { return -1; } -#if !PORTABLE || DOTNET catch (SocketException e) { if (TlsUtilities.IsTimeout(e)) @@ -460,7 +457,6 @@ namespace Org.BouncyCastle.Tls throw e; } -#endif // TODO[tls-port] Can we support interrupted IO on .NET? //catch (InterruptedIOException e) //{ diff --git a/crypto/src/tls/DtlsTransport.cs b/crypto/src/tls/DtlsTransport.cs index a41cb7866..1a6ec131f 100644 --- a/crypto/src/tls/DtlsTransport.cs +++ b/crypto/src/tls/DtlsTransport.cs @@ -1,8 +1,6 @@ using System; using System.IO; -#if !PORTABLE || DOTNET using System.Net.Sockets; -#endif namespace Org.BouncyCastle.Tls { @@ -53,7 +51,6 @@ namespace Org.BouncyCastle.Tls { throw e; } -#if !PORTABLE || DOTNET catch (SocketException e) { if (TlsUtilities.IsTimeout(e)) @@ -62,7 +59,6 @@ namespace Org.BouncyCastle.Tls m_recordLayer.Fail(AlertDescription.internal_error); throw new TlsFatalAlert(AlertDescription.internal_error, e); } -#endif // TODO[tls-port] Can we support interrupted IO on .NET? //catch (InterruptedIOException e) //{ @@ -103,7 +99,6 @@ namespace Org.BouncyCastle.Tls { throw e; } -#if !PORTABLE || DOTNET catch (SocketException e) { if (TlsUtilities.IsTimeout(e)) @@ -112,7 +107,6 @@ namespace Org.BouncyCastle.Tls m_recordLayer.Fail(AlertDescription.internal_error); throw new TlsFatalAlert(AlertDescription.internal_error, e); } -#endif // TODO[tls-port] Can we support interrupted IO on .NET? //catch (InterruptedIOException e) //{ -- cgit 1.4.1