Say I own a domain called Bob.com, and I've sent an API request to Google.com. But instead of supplying a certificate for Bob.com, I send a certificate for Alice.com (which I got from a previous API request from Alice.com to my site). How / at what point in the SSL handshake does this mismatch get identified and the request to connect refused by Google.com? I've been thinking it through and can only think of two possibilities:
1) Google.com checks that the domain of the requester (Bob.com) matches one of the domain names in the certificate presented, and aborts the handshake if these don't match (however, I expect Google.com would only know the IP address of the requester rather than it's domain name)
2) At some point during the handshake (possibly key exchange?) Bob.com will need to perform some action that uses Alice.com's private key - and, as it doesn't have this, the handshake cannot be competed (if this is the case, at what point in the handshake does this action happen?)
Thanks in advance!!