I can generate a self signed certificate for any Common Name, such as
www.google.com. If I have a server at
example.com and serve up a certificate with the common name
www.google.com and the user accepts it. Would that allow me to MITM a connection to
www.google.com with that certificate without them having to accept it again?
If not, what prevents that from working? Does the browser keep a table of certificate fingerprints to the domain which it came from?
I tested this myself and it didn't work, but I'm looking for further validation since it's possible my testing was flawed.