Warnings
[mono.git] / mcs / class / Mono.Security / Mono.Security.Protocol.Tls / ServerRecordProtocol.cs
index 900eeda79a23b5995de90a99c5deaac5b72e266f..015a3d2edd6c1f1523330c4cdb2312ef4e16057b 100644 (file)
@@ -122,7 +122,9 @@ namespace Mono.Security.Protocol.Tls
                                        return new TlsClientFinished(this.context, buffer);
 
                                default:
-                                       throw this.context.CreateException("Unknown server handshake message received ({0})", type.ToString());
+                                       throw new TlsException(
+                                               AlertDescription.UnexpectedMessage,
+                                               String.Format("Unknown server handshake message received ({0})", type.ToString()));
                        }
                }