Move server side TLS to new state machine