*/
using System;
+using System.Globalization;
using System.IO;
using Mono.Security.Protocol.Tls.Handshake;
{
// Create the record message
HandshakeMessage msg = this.createServerHandshakeMessage(type);
+ msg.Process();
// Write record
this.SendRecord(msg.ContentType, msg.EncodeMessage());
// Create and process the server message
message = this.createClientHandshakeMessage(handshakeType, data);
+ message.Process();
// Update the last handshake message
this.Context.LastHandshakeMsg = handshakeType;
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(CultureInfo.CurrentUICulture,
+ "Unknown server handshake message received ({0})",
+ type.ToString()));
}
}