1
$\begingroup$

Assuming the alert protocol is encrypted AFTER a session has been established and the structure below, how does the client know whether to expect encrypted data or not?

http://en.wikipedia.org/wiki/Transport_Layer_Security#Alert_protocol

$\endgroup$
3
$\begingroup$

Switch from plain to encrypted is marked by a special record type called change_cipher_spec (which is neither handshake, alert or application_data); it is unambiguous. Plus, the moment the switch occurs is quite clear from the client point of view, given the previous handshake messages.

If unsure, have a look at the actual standard, which is quite clear (for a standard). This answer can serve as an introduction.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.