Currently implementing code similar to what was presented in this answer and I was curious as to what is happening under the hood. Does the SSL handshake occur when the socket is wrapped? Furthermore, is there a way to access the symmetric key that is being utilized for the data being transmitted over the SSL connection (after the connection is negotiated, that is)?
Asked
Active
Viewed 965 times
2
-
What do you mean by "Does the SSL handshake occur when the socket is wrapped?" exactly? – John R Smith Nov 12 '17 at 00:27
-
I'm not sure when the handshake happens. I was assuming it happened somewhere in the `ssl.wrap_socket` function, but there is one on the client side and on the server side, so I'm just trying to get a feel when that data is being exchanged. – JGrindal Nov 12 '17 at 00:30
-
For details of the SSL handshake (i.e. what happens inside `wrap_socket`) see [How does SSL/TLS work?](https://security.stackexchange.com/questions/20803/how-does-ssl-tls-work) at security.se. – Steffen Ullrich Nov 12 '17 at 07:57
-
@SteffenUllrich I know the technical aspects of _what_ is happening, what I'm not sure of is _when_ it's happening or how to access the details of it - that is the subject of this question. – JGrindal Nov 12 '17 at 15:32
-
@JGrindal: what do you mean with "when". All of it is happening inside the `wrap_socket` on client and server if this is what you mean. – Steffen Ullrich Nov 12 '17 at 16:01