2004-04-15 Carlos Guzman Alvarez <carlosga@telefonica.net>
[mono.git] / mcs / class / Mono.Security / Mono.Security.Protocol.Tls.Handshake.Server / TlsClientHello.cs
index c05acac07d7ea127592e6565bb3c9d5bce2bf021..8b97797bd187c612bd1e5dcf623d3fee91eb4420 100644 (file)
@@ -118,9 +118,9 @@ namespace Mono.Security.Protocol.Tls.Handshake.Server
                        }
                        else
                        {
-                               this.Context.RecordProtocol.SendAlert(AlertDescription.ProtocolVersion);
-
-                               throw this.Context.CreateException("Incorrect protocol version received from server");
+                               throw new TlsException(
+                                       AlertDescription.ProtocolVersion,
+                                       "Incorrect protocol version received from server");
                        }
                }
 
@@ -139,9 +139,9 @@ namespace Mono.Security.Protocol.Tls.Handshake.Server
 
                        if (this.Context.Cipher == null)
                        {
-                               this.Context.RecordProtocol.SendAlert(AlertDescription.InsuficientSecurity);
-
-                               throw this.Context.CreateException("Insuficient Security");
+                               throw new TlsException(
+                                       AlertDescription.InsuficientSecurity,
+                                       "Insuficient Security");
                        }
                }