主权项 |
1. A method in a first server for establishing a secure session with a client device, the method comprising:
receiving a Client Hello message from the client device and transmitting the Client Hello message to a second server; receiving, from the second server, a Server Hello message in response to the Client Hello message and transmitting the Server Hello message to the client device; receiving, from the second server, a Certificate message that includes a digital certificate and transmitting the Certificate message to the client device; receiving, from the second server, a Server Key Exchange message that includes a set of cryptographic parameters that is signed using a private key stored on the second server and not available on the first server and transmitting the Server Key Exchange message to the client device, wherein the set of cryptographic parameters are to be used by the client device when generating a premaster secret and include a Diffie-Hellman public value selected by the second server; receiving, from the second server, a Server Hello Done message and transmitting the Server Hello Done message to the client device; receiving, from the client device, a Client Key Exchange message that includes a Diffie-Hellman public value selected by the client device and transmitting the Client Key Exchange message to the second server; receiving, from the second server, a set of one or more session keys to be used in the secure session for encrypting and decrypting communication between the client device and the first server that were generated at least using a master secret that is generated using a premaster secret that is generated using the Diffie-Hellman public value selected by the client device and the Diffie-Hellman public value selected by the second server; receiving, from the client device, a first Change Cipher Spec message that indicates that future messages sent from the client device will be encrypted; receiving, from the client device, a first Finished message that is encrypted according to the session keys; transmitting, to the client device, a second Change Cipher Spec message that indicates that future messages sent to the client device will be encrypted; and transmitting, to the client device, a second Finished message that is encrypted according to the session keys. |