Only the configuration of the CA-based authentication can. Nobody loves X509 PKIs, but so far, they seem to "work".
This matters because you can literally write a HOWTO that my mom could follow to get a browser configured so that China can't snoop on (many of) your HTTPS connections. No code required.
Trying to "fix" this by rolling your own ad-hoc encryption (while ignoring the authentication issue entirely) is completely missing the point.