I was trying to learn TLS in depth. Probably my understanding is wrong. This is what I understood:
At the end of client handshake, the server will send the CA certificate to the client which contains the Public Key and specify which algorithm to use. Browser will verify the authenticity of the certificate by comparing trusted authorities,CN and Public key.
My question is, can't these parameters be spoofed by a malicious server? For example, the attacker can actually make a SSL handshake to the valid server and collect the server response certificate and create their own certificate with the same parameters right?
What are the factors affecting this spoofing? Is there any other PKI involved in validating the Certificate?