Fix check and use 256 bit

This commit is contained in:
Bolke de Bruin 2020-07-25 21:27:03 +02:00
parent 0b299619ff
commit 263312dc7b
4 changed files with 9 additions and 7 deletions

View file

@ -78,7 +78,7 @@ func (h *Handler) Process(ctx context.Context) error {
switch pt {
case PKT_TYPE_HANDSHAKE_REQUEST:
log.Printf("Handshake")
log.Printf("Client handshake from %s", client.GetClientIp(ctx))
if h.State != SERVER_STATE_INITIAL {
log.Printf("Handshake attempted while in wrong state %d != %d", h.State, SERVER_STATE_INITIAL)
return errors.New("wrong state")