[Dnsmail-cvs] dnsmail Erle.DnsMail.csproj, 1.7, 1.8 Erle.DnsMail.csproj.user, 1.3, 1.4 Erle.DnsMail
Brought to you by:
ethem
From: Ethem E. <et...@us...> - 2006-08-18 11:27:21
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv31461/dnsmail Modified Files: Erle.DnsMail.csproj Erle.DnsMail.csproj.user Erle.DnsMail.sln SmtpClient.cs UnsafeNativeMethods.cs Log Message: New Configurations: Debug-Ssl and Release-Ssl Don't build SSL support in default configurations. Index: Erle.DnsMail.csproj =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/Erle.DnsMail.csproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Erle.DnsMail.csproj 7 Aug 2006 10:17:47 -0000 1.7 --- Erle.DnsMail.csproj 18 Aug 2006 11:27:16 -0000 1.8 *************** *** 63,66 **** --- 63,106 ---- WarningLevel = "4" /> + <Config + Name = "Debug-Ssl" + AllowUnsafeBlocks = "true" + BaseAddress = "285212672" + CheckForOverflowUnderflow = "false" + ConfigurationOverrideFile = "" + DefineConstants = "DEBUG;TRACE;SSL" + DocumentationFile = "" + DebugSymbols = "true" + FileAlignment = "4096" + IncrementalBuild = "false" + NoStdLib = "false" + NoWarn = "" + Optimize = "false" + OutputPath = "bin\Debug\" + RegisterForComInterop = "false" + RemoveIntegerChecks = "false" + TreatWarningsAsErrors = "false" + WarningLevel = "4" + /> + <Config + Name = "Release-Ssl" + AllowUnsafeBlocks = "true" + BaseAddress = "285212672" + CheckForOverflowUnderflow = "false" + ConfigurationOverrideFile = "" + DefineConstants = "TRACE;SSL" + DocumentationFile = "" + DebugSymbols = "false" + FileAlignment = "4096" + IncrementalBuild = "false" + NoStdLib = "false" + NoWarn = "" + Optimize = "true" + OutputPath = "bin\Release\" + RegisterForComInterop = "false" + RemoveIntegerChecks = "false" + TreatWarningsAsErrors = "false" + WarningLevel = "4" + /> </Settings> <References> Index: UnsafeNativeMethods.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/UnsafeNativeMethods.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UnsafeNativeMethods.cs 7 Aug 2006 08:25:14 -0000 1.5 --- UnsafeNativeMethods.cs 18 Aug 2006 11:27:17 -0000 1.6 *************** *** 195,199 **** #endregion } ! internal unsafe sealed class UnsafeOpenSsl { --- 195,199 ---- #endregion } ! #if SSL internal unsafe sealed class UnsafeOpenSsl { *************** *** 250,252 **** --- 250,253 ---- internal static extern int i2d_X509(IntPtr cer, byte** ppOut); } + #endif }; Index: Erle.DnsMail.sln =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/Erle.DnsMail.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Erle.DnsMail.sln 1 Mar 2006 18:39:44 -0000 1.1 --- Erle.DnsMail.sln 18 Aug 2006 11:27:17 -0000 1.2 *************** *** 7,17 **** --- 7,23 ---- GlobalSection(SolutionConfiguration) = preSolution Debug = Debug + Debug-Ssl = Debug-Ssl Release = Release + Release-Ssl = Release-Ssl EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {3E455322-C318-446C-87BA-4E390D201FC2}.Debug.ActiveCfg = Debug|.NET {3E455322-C318-446C-87BA-4E390D201FC2}.Debug.Build.0 = Debug|.NET + {3E455322-C318-446C-87BA-4E390D201FC2}.Debug-Ssl.ActiveCfg = Debug-Ssl|.NET + {3E455322-C318-446C-87BA-4E390D201FC2}.Debug-Ssl.Build.0 = Debug-Ssl|.NET {3E455322-C318-446C-87BA-4E390D201FC2}.Release.ActiveCfg = Release|.NET {3E455322-C318-446C-87BA-4E390D201FC2}.Release.Build.0 = Release|.NET + {3E455322-C318-446C-87BA-4E390D201FC2}.Release-Ssl.ActiveCfg = Release-Ssl|.NET + {3E455322-C318-446C-87BA-4E390D201FC2}.Release-Ssl.Build.0 = Release-Ssl|.NET EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SmtpClient.cs 11 Aug 2006 14:35:19 -0000 1.8 --- SmtpClient.cs 18 Aug 2006 11:27:17 -0000 1.9 *************** *** 13,23 **** internal class SmtpClient : TcpClient, IDisposable { private IntPtr sslContext = IntPtr.Zero; private IntPtr sslSession = IntPtr.Zero; - private NetworkStream dataStream = null; - - #region .ctor .cctor .dtor private static readonly String _sslVersion; private static readonly bool _sslAvailable; static SmtpClient() { --- 13,26 ---- internal class SmtpClient : TcpClient, IDisposable { + private NetworkStream dataStream = null; + #if SSL private IntPtr sslContext = IntPtr.Zero; private IntPtr sslSession = IntPtr.Zero; private static readonly String _sslVersion; private static readonly bool _sslAvailable; + #endif + + #region .ctor .cctor .dtor + #if SSL static SmtpClient() { *************** *** 46,49 **** --- 49,53 ---- } } + #endif public SmtpClient(IPEndPoint remote, IPEndPoint local, bool useLog) *************** *** 108,112 **** } } ! if (_sslAvailable) { --- 112,116 ---- } } ! #if SSL if (_sslAvailable) { *************** *** 126,129 **** --- 130,134 ---- } } + #endif } base.Dispose(disposing); *************** *** 144,151 **** --- 149,158 ---- get { + #if SSL if (_sslAvailable && !disposed) { return handshake; } + #endif return false; } *************** *** 211,214 **** --- 218,222 ---- get { + #if SSL if (handshake && !disposed) { *************** *** 224,227 **** --- 232,236 ---- return available; } + #endif return base.Client.Available; } *************** *** 229,232 **** --- 238,243 ---- #region Static Properties + + #if SSL public static String OpenSslVersion { *************** *** 238,241 **** --- 249,254 ---- get { return _sslAvailable; } } + #endif + #endregion *************** *** 243,251 **** #region StartTls ! private bool handshake = false; public bool StartTls(bool cerrequest) { bool ret = false; if (_sslAvailable && !disposed && !handshake && (Client.RemoteEndPoint != null)) { --- 256,266 ---- #region StartTls ! #if SSL private bool handshake = false; + #endif public bool StartTls(bool cerrequest) { bool ret = false; + #if SSL if (_sslAvailable && !disposed && !handshake && (Client.RemoteEndPoint != null)) { *************** *** 344,351 **** --- 359,368 ---- } } + #endif return ret; } #endregion + #if SSL #region handle_ssl_error private enum SslError *************** *** 419,422 **** --- 436,440 ---- } #endregion + #endif #region Send & Receive *************** *** 478,481 **** --- 496,500 ---- { int read = -1; + #if SSL if (handshake) { *************** *** 505,508 **** --- 524,528 ---- } else + #endif { read = dataStream.Read(buffer, offset, count); *************** *** 513,516 **** --- 533,537 ---- unsafe public void Write(byte[] buffer, int offset, int count) { + #if SSL if (handshake) { *************** *** 542,545 **** --- 563,567 ---- } else + #endif { dataStream.Write(buffer, offset, count); Index: Erle.DnsMail.csproj.user =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/Erle.DnsMail.csproj.user,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Erle.DnsMail.csproj.user 4 Aug 2006 12:53:36 -0000 1.3 --- Erle.DnsMail.csproj.user 18 Aug 2006 11:27:16 -0000 1.4 *************** *** 35,38 **** --- 35,70 ---- StartWithIE = "true" /> + <Config + Name = "Debug-Ssl" + EnableASPDebugging = "false" + EnableASPXDebugging = "false" + EnableUnmanagedDebugging = "false" + EnableSQLServerDebugging = "false" + RemoteDebugEnabled = "false" + RemoteDebugMachine = "" + StartAction = "Project" + StartArguments = "" + StartPage = "" + StartProgram = "" + StartURL = "" + StartWorkingDirectory = "" + StartWithIE = "true" + /> + <Config + Name = "Release-Ssl" + EnableASPDebugging = "false" + EnableASPXDebugging = "false" + EnableUnmanagedDebugging = "false" + EnableSQLServerDebugging = "false" + RemoteDebugEnabled = "false" + RemoteDebugMachine = "" + StartAction = "Project" + StartArguments = "" + StartPage = "" + StartProgram = "" + StartURL = "" + StartWorkingDirectory = "" + StartWithIE = "true" + /> </Settings> </Build> |