Exemplo n.º 1
0
        protected virtual byte[] GenerateNewSessionTicket(ServerHandshakeState state, NewSessionTicket newSessionTicket)
        {
            MemoryStream buf = new MemoryStream();

            newSessionTicket.Encode(buf);
            return(buf.ToArray());
        }
Exemplo n.º 2
0
        protected virtual void SendNewSessionTicketMessage(NewSessionTicket newSessionTicket)
        {
            if (newSessionTicket == null)
            {
                throw new TlsFatalAlert(AlertDescription.internal_error);
            }

            HandshakeMessage message = new HandshakeMessage(HandshakeType.session_ticket);

            newSessionTicket.Encode(message);

            message.WriteToRecordStream(this);
        }