diff options
author | Carlos Guzmán Álvarez <carlos@mono-cvs.ximian.com> | 2004-05-09 13:48:56 +0400 |
---|---|---|
committer | Carlos Guzmán Álvarez <carlos@mono-cvs.ximian.com> | 2004-05-09 13:48:56 +0400 |
commit | 1e0d4468ae4fea399a6337cf2ac8db72c28751e7 (patch) | |
tree | 4537cc3ee475cf0abe95c3d89a2e62730dded178 /mcs/class/Mono.Security | |
parent | ce89d39da968b2e92ec699b0d79ff4337f5ca26e (diff) |
2004-05-09 Carlos Guzman Alvarez <carlosga@telefonica.net>
* Mono.Security.Protocol.Tls/Alert.cs:
* Mono.Security.Protocol.Tls/CipherSuite.cs:
* Mono.Security.Protocol.Tls/CipherSuiteCollection.cs:
* Mono.Security.Protocol.Tls/ClientRecordProtocol.cs:
* Mono.Security.Protocol.Tls/Context.cs:
* Mono.Security.Protocol.Tls/RecordProtocol.cs:
* Mono.Security.Protocol.Tls/SecurityCompressionType.cs:
* Mono.Security.Protocol.Tls/ServerRecordProtocol.cs:
* Mono.Security.Protocol.Tls/SslServerStream.cs:
* Mono.Security.Protocol.Tls/TlsClientSettings.cs:
- Changes for fix FxCop Rules.
- Reworked CipherSuiteCollection class.
* Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs:
- Changes for fix FxCop Rules.
* Mono.Security.Protocol.Tls/DebugHelper.cs:
- New class.
* Mono.Security.Protocol.Tls/ClientRecordProtocol.cs:
* Mono.Security.Protocol.Tls/RecordProtocol.cs:
* Mono.Security.Protocol.Tls/Context.cs:
* Mono.Security.Protocol.Tls/Context.cs:
* Mono.Security.Protocol.Tls/SslCipherSuite.cs:
* Mono.Security.Protocol.Tls/TlsCipherSuite.cs:
* Mono.Security.Protocol.Tls/SslClientStream.cs:
- Added debug capabilities.
* Mono.Security.Protocol.Tls/ServerContext.cs:
- Added initialization of requested CertificateTypes and CA's
* Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificate.cs:
* Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs:
* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs:
* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHello.cs:
* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs:
- Modfied exception handling
- Added debug capabilities.
* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificateRequest.cs:
- Modify SSL implementation.
* Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificateRequest.cs:
- Initial implementation.
* Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificateVerify.cs:
* Mono.Security.Protocol.Tls.Handshake.Server/TlsClientFinished.cs:
* Mono.Security.Protocol.Tls.Handshake.Server/TlsClientHello.cs:
- Modfied exception handling
svn path=/trunk/mcs/; revision=26982
Diffstat (limited to 'mcs/class/Mono.Security')
17 files changed, 193 insertions, 65 deletions
diff --git a/mcs/class/Mono.Security/ChangeLog b/mcs/class/Mono.Security/ChangeLog index 67e4ddcf7e5..dad05eed8a8 100644 --- a/mcs/class/Mono.Security/ChangeLog +++ b/mcs/class/Mono.Security/ChangeLog @@ -1,3 +1,24 @@ +2004-05-09 Carlos Guzman Alvarez <carlosga@telefonica.net>
+
+ * Mono.Security.Protocol.Tls/Alert.cs:
+ * Mono.Security.Protocol.Tls/CipherSuite.cs:
+ * Mono.Security.Protocol.Tls/CipherSuiteCollection.cs:
+ * Mono.Security.Protocol.Tls/ClientRecordProtocol.cs:
+ * Mono.Security.Protocol.Tls/Context.cs:
+ * Mono.Security.Protocol.Tls/RecordProtocol.cs:
+ * Mono.Security.Protocol.Tls/SecurityCompressionType.cs:
+ * Mono.Security.Protocol.Tls/ServerRecordProtocol.cs:
+ * Mono.Security.Protocol.Tls/SslServerStream.cs:
+ * Mono.Security.Protocol.Tls/TlsClientSettings.cs:
+
+ - Changes for fix FxCop Rules. + + - Reworked CipherSuiteCollection class.
+
+ * Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs:
+
+ - Changes for fix FxCop Rules.
+ 2004-04-21 Carlos Guzman Alvarez <carlosga@telefonica.net>
* Mono.Security.Protocol.Tls/DebugHelper.cs:
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs index 776eb5659bd..10516229876 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs @@ -102,7 +102,7 @@ namespace Mono.Security.Protocol.Tls.Handshake.Client buffer); } } - + this.validateCertificates(certificates); } @@ -222,6 +222,7 @@ namespace Mono.Security.Protocol.Tls.Handshake.Client X509CertificateCollection chain = new X509CertificateCollection (certificates); chain.Remove (leaf); X509Chain verify = new X509Chain (chain); + if (!verify.Build (leaf)) { switch (verify.Status) diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs index d5bb7a542e5..91507c855e3 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs @@ -72,21 +72,15 @@ namespace Mono.Security.Protocol.Tls.Handshake this.context = context; this.handshakeType = handshakeType; this.contentType = contentType; - - // Process message - this.process(); } public HandshakeMessage( Context context, HandshakeType handshakeType, - byte[] data) : base(data) + byte[] data) : base(data) { this.context = context; - this.handshakeType = handshakeType; - - // Process message - this.process(); + this.handshakeType = handshakeType; } #endregion @@ -101,7 +95,7 @@ namespace Mono.Security.Protocol.Tls.Handshake #region Methods - private void process() + public void Process() { switch (this.Context.SecurityProtocol) { diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Alert.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Alert.cs index 20dcdf8568c..1c6ef7c6c69 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Alert.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Alert.cs @@ -97,10 +97,12 @@ namespace Mono.Security.Protocol.Tls get { return this.level == AlertLevel.Warning ? true : false; } } + /* public bool IsFatal { get { return this.level == AlertLevel.Fatal ? true : false; } } + */ public bool IsCloseNotify { diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog index b09884593eb..e55f1f5ecd8 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog @@ -1,3 +1,21 @@ +2004-05-09 Carlos Guzman Alvarez <carlosga@telefonica.net>
+
+ * Mono.Security.Protocol.Tls/Alert.cs:
+ * Mono.Security.Protocol.Tls/CipherSuite.cs:
+ * Mono.Security.Protocol.Tls/CipherSuiteCollection.cs:
+ * Mono.Security.Protocol.Tls/ClientRecordProtocol.cs:
+ * Mono.Security.Protocol.Tls/Context.cs:
+ * Mono.Security.Protocol.Tls/RecordProtocol.cs:
+ * Mono.Security.Protocol.Tls/SecurityCompressionType.cs:
+ * Mono.Security.Protocol.Tls/ServerRecordProtocol.cs:
+ * Mono.Security.Protocol.Tls/SslServerStream.cs:
+ * Mono.Security.Protocol.Tls/TlsClientSettings.cs:
+
+ - Changes for fix FxCop Rules. + + - Reworked CipherSuiteCollection class.
+
+ 2004-04-21 Carlos Guzman Alvarez <carlosga@telefonica.net> * Mono.Security.Protocol.Tls/DebugHelper.cs:
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs index 17f031961f9..a6f8852f66d 100755 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs @@ -189,10 +189,12 @@ namespace Mono.Security.Protocol.Tls get { return this.ivSize; } } + /* public byte BlockSize { get { return this.blockSize; } } + */ public Context Context { @@ -254,6 +256,7 @@ namespace Mono.Security.Protocol.Tls } } + /* public void UpdateServerCipherIV(byte[] iv) { if (this.cipherMode == CipherMode.CBC) @@ -265,6 +268,7 @@ namespace Mono.Security.Protocol.Tls this.decryptionCipher = this.decryptionAlgorithm.CreateDecryptor(); } } + */ public byte[] EncryptRecord(byte[] fragment, byte[] mac) { diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs index bbbb089ec9b..79e98fe4c5d 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs @@ -29,32 +29,72 @@ using System.Security.Cryptography; namespace Mono.Security.Protocol.Tls { - internal sealed class CipherSuiteCollection : ArrayList + internal sealed class CipherSuiteCollection : ICollection, IList, IEnumerable { #region Fields - private SecurityProtocolType protocol; + private ArrayList cipherSuites; + private SecurityProtocolType protocol; #endregion - #region Properties + #region Indexers public CipherSuite this[string name] { - get { return (CipherSuite)this[IndexOf(name)]; } - set { this[IndexOf(name)] = (CipherSuite)value; } + get { return (CipherSuite)this.cipherSuites[this.IndexOf(name)]; } + set { this.cipherSuites[this.IndexOf(name)] = (CipherSuite)value; } + } + + public CipherSuite this[int index] + { + get { return (CipherSuite)this.cipherSuites[index]; } + set { this.cipherSuites[index] = (CipherSuite)value; } } public CipherSuite this[short code] { - get { return (CipherSuite)base[IndexOf(code)]; } - set { base[IndexOf(code)] = (CipherSuite)value; } + get { return (CipherSuite)this.cipherSuites[this.IndexOf(code)]; } + set { this.cipherSuites[this.IndexOf(code)] = (CipherSuite)value; } + } + + object IList.this[int index] + { + get { return this[index]; } + set { this[index] = (CipherSuite)value; } + } + + #endregion + + #region ICollection Properties + + bool ICollection.IsSynchronized + { + get { return this.cipherSuites.IsSynchronized; } + } + + object ICollection.SyncRoot + { + get { return this.cipherSuites.SyncRoot; } } - public new CipherSuite this[int code] + public int Count { - get { return (CipherSuite)base[code]; } - set { base[code] = (CipherSuite)value; } + get { return this.cipherSuites.Count; } + } + + #endregion + + #region IList Properties + + public bool IsFixedSize + { + get { return this.cipherSuites.IsFixedSize; } + } + + public bool IsReadOnly + { + get { return this.cipherSuites.IsReadOnly; } } #endregion @@ -63,25 +103,49 @@ namespace Mono.Security.Protocol.Tls public CipherSuiteCollection(SecurityProtocolType protocol) : base() { - this.protocol = protocol; + this.protocol = protocol; + this.cipherSuites = new ArrayList(); } #endregion - #region Methods - - public bool Contains(string name) + #region ICollection Methods + + public void CopyTo(Array array, int index) { - return (-1 != this.IndexOf(name)); + this.cipherSuites.CopyTo(array, index); } + #endregion + + #region IEnumerable Methods + + IEnumerator IEnumerable.GetEnumerator() + { + return this.cipherSuites.GetEnumerator(); + } + + #endregion + + #region IList Methods + + public void Clear() + { + this.cipherSuites.Clear(); + } + + bool IList.Contains(object value) + { + return this.cipherSuites.Contains(value as CipherSuite); + } + public int IndexOf(string name) { int index = 0; - foreach (CipherSuite suite in this) + foreach (CipherSuite cipherSuite in this.cipherSuites) { - if (this.cultureAwareCompare(suite.Name, name)) + if (this.cultureAwareCompare(cipherSuite.Name, name)) { return index; } @@ -95,9 +159,9 @@ namespace Mono.Security.Protocol.Tls { int index = 0; - foreach (CipherSuite suite in this) + foreach (CipherSuite cipherSuite in this.cipherSuites) { - if (suite.Code == code) + if (cipherSuite.Code == code) { return index; } @@ -107,9 +171,24 @@ namespace Mono.Security.Protocol.Tls return -1; } - public void RemoveAt(string errorMessage) + int IList.IndexOf(object value) { - this.RemoveAt(this.IndexOf(errorMessage)); + return this.cipherSuites.IndexOf(value as CipherSuite); + } + + void IList.Insert(int index, object value) + { + this.cipherSuites.Insert(index, value as CipherSuite); + } + + void IList.Remove(object value) + { + this.cipherSuites.Remove(value as CipherSuite); + } + + void IList.RemoveAt(int index) + { + this.cipherSuites.RemoveAt(index); } public CipherSuite Add( @@ -144,18 +223,23 @@ namespace Mono.Security.Protocol.Tls private TlsCipherSuite add(TlsCipherSuite cipherSuite) { - base.Add(cipherSuite); + this.cipherSuites.Add(cipherSuite); return cipherSuite; } private SslCipherSuite add(SslCipherSuite cipherSuite) { - base.Add(cipherSuite); + this.cipherSuites.Add(cipherSuite); return cipherSuite; } + int IList.Add(object value) + { + return this.cipherSuites.Add(value as CipherSuite); + } + private bool cultureAwareCompare(string strA, string strB) { return CultureInfo.CurrentCulture.CompareInfo.Compare( diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs index 24326a76cbf..3fabcfd408a 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs @@ -23,6 +23,7 @@ */ using System; +using System.Globalization; using System.IO; using Mono.Security.Protocol.Tls.Handshake; @@ -46,9 +47,10 @@ namespace Mono.Security.Protocol.Tls public override void SendRecord(HandshakeType type) { - // Create the record message + // Create and process the record message HandshakeMessage msg = this.createClientHandshakeMessage(type); - + msg.Process(); + DebugHelper.WriteLine(">>>> Write handshake record ({0}|{1})", context.Protocol, msg.ContentType); // Write record @@ -87,6 +89,7 @@ namespace Mono.Security.Protocol.Tls // Create and process the server message message = this.createServerHandshakeMessage(handshakeType, data); + message.Process(); // Update the last handshake message this.Context.LastHandshakeMsg = handshakeType; @@ -167,7 +170,9 @@ namespace Mono.Security.Protocol.Tls default: throw new TlsException( AlertDescription.UnexpectedMessage, - String.Format("Unknown server handshake message received ({0})", type.ToString())); + String.Format(CultureInfo.CurrentUICulture, + "Unknown server handshake message received ({0})", + type.ToString())); } } diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Context.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Context.cs index d57982bc2c4..b13b393f73f 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Context.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Context.cs @@ -177,13 +177,11 @@ namespace Mono.Security.Protocol.Tls public TlsServerSettings ServerSettings { get { return this.serverSettings; } - set { this.serverSettings = value; } } public TlsClientSettings ClientSettings { get { return this.clientSettings; } - set { this.clientSettings = value; } } public bool IsActual diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs index 7c6ce7d56cd..60c14b6e3ee 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs @@ -37,7 +37,7 @@ namespace Mono.Security.Protocol.Tls if (!isInitialized) { Debug.Listeners.Add(new TextWriterTraceListener(Console.Out)); - // Debug.Listeners.Add(new TextWriterTraceListener(@"ssl.log")); + // Debug.Listeners.Add(new TextWriterTraceListener(@"c:\ssl.log")); Debug.AutoFlush = true; Debug.Indent(); @@ -63,7 +63,7 @@ namespace Mono.Security.Protocol.Tls public static void WriteLine(string message, byte[] buffer) { Initialize(); - DebugHelper.WriteLine(String.Format("{0} ({1} bytes)", message, buffer.Length)); + DebugHelper.WriteLine(String.Format("{0} ({1} bytes))", message, buffer.Length)); DebugHelper.WriteBuffer(buffer); } diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs index 1744d00196f..dd8feeac677 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs @@ -42,12 +42,6 @@ namespace Mono.Security.Protocol.Tls #region Properties - public Stream InnerStream - { - get { return this.innerStream; } - set { this.innerStream = value; } - } - public Context Context { get { return this.context; } diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs index fc4d111f81c..ff47fc3ef2d 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs @@ -29,7 +29,7 @@ namespace Mono.Security.Protocol.Tls // Information about compression methods allowed by TLS // can be found in: // draft-ietf-tls-compression-05.txt (http://www.ietf.org/internet-drafts/draft-ietf-tls-compression-05.txt) - public enum SecurityCompressionType : byte + public enum SecurityCompressionType { None = 0, Zlib = 1 diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs index 015a3d2edd6..4b958674bba 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs @@ -23,6 +23,7 @@ */ using System; +using System.Globalization; using System.IO; using Mono.Security.Protocol.Tls.Handshake; @@ -48,6 +49,7 @@ namespace Mono.Security.Protocol.Tls { // Create the record message HandshakeMessage msg = this.createServerHandshakeMessage(type); + msg.Process(); // Write record this.SendRecord(msg.ContentType, msg.EncodeMessage()); @@ -86,6 +88,7 @@ namespace Mono.Security.Protocol.Tls // Create and process the server message message = this.createClientHandshakeMessage(handshakeType, data); + message.Process(); // Update the last handshake message this.Context.LastHandshakeMsg = handshakeType; @@ -124,7 +127,9 @@ namespace Mono.Security.Protocol.Tls default: throw new TlsException( AlertDescription.UnexpectedMessage, - String.Format("Unknown server handshake message received ({0})", type.ToString())); + String.Format(CultureInfo.CurrentUICulture, + "Unknown server handshake message received ({0})", + type.ToString())); } } diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs index 864887f031a..179bcab26e8 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs @@ -718,7 +718,7 @@ namespace Mono.Security.Protocol.Tls #region Event Methods - internal virtual bool RaiseClientCertificateValidation( + internal bool RaiseClientCertificateValidation( X509Certificate certificate, int[] certificateErrors) { diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs index 374ef68b502..e9ef4f75f44 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs @@ -189,4 +189,4 @@ namespace Mono.Security.Protocol.Tls #endregion } -} +}
\ No newline at end of file diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs index d0ca874f568..69ae62ac02b 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs @@ -55,19 +55,6 @@ namespace Mono.Security.Protocol.Tls get { return this.certificates; } set { this.certificates = value; } } - - public SecurityCompressionType CompressionMethod - { - get { return this.compressionMethod; } - set - { - if (value != SecurityCompressionType.None) - { - throw new NotSupportedException("Specified compression method is not supported"); - } - this.compressionMethod = value; - } - } public X509Certificate ClientCertificate { @@ -84,6 +71,21 @@ namespace Mono.Security.Protocol.Tls get { return this.certificateRSA; } } + /* + public SecurityCompressionType CompressionMethod + { + get { return this.compressionMethod; } + set + { + if (value != SecurityCompressionType.None) + { + throw new NotSupportedException("Specified compression method is not supported"); + } + this.compressionMethod = value; + } + } + */ + #endregion #region Constructors diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs index 19818db58a0..065904cd3ed 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs @@ -29,7 +29,7 @@ using System.Runtime.Serialization; namespace Mono.Security.Protocol.Tls { [Serializable] - public sealed class TlsException : Exception + internal sealed class TlsException : Exception { #region Fields @@ -39,7 +39,7 @@ namespace Mono.Security.Protocol.Tls #region Properties - internal Alert Alert + public Alert Alert { get { return this.alert; } } |