Why is server FIN’ing after starting TLS session

tls

TLS server is doing something I don't understand.

  1. TCP handshake executes normally.
  2. SSL Client Hello executes normally.
  3. SSL Server Hello seems normal. Provides certificate, says Server Hello Done.
  4. Dissection shows client issues "Client Key Exchange, Change Cipher Spec, Encrypted Handshake Message"
  5. Dissection shows server issues "Change Cipher Spec" then "Encrypted Handshake Message"

Client now ACKs, starts to send data. But server ACKs then sends an "Encrypted Alert" and FIN's out.

This has happened just after swapping out certs. The cert presented in the SSL handshake is the new key.

Clue, anyone?

Best Answer

Its probably due to an SNI issue with either the client or some device in the middle, like a load balancer. The load balancing device must be able to present the server name to the backend host as part of the initial Client Hello. see https://en.m.wikipedia.org/wiki/Server_Name_Indication