Describe the TLS handshake process and identify potential security weaknesses that can occur if it is misconfigured.