Subject: until the TLS hand shake has not done, server send the data in plain text.
wait until tls complete handshake, i have written the below code, as we know that xmpp is async, it does not wait, during tls handshake the client send username and password, server send the sasl stream, until tls handshake is not complete it sends the data through simple socket.
In short until the TLS hand shake has not done, server send the data in plain text. Solution should i wait here until isTLSAuthenticated ?? or agsxmpp provide any solution for this??
In short until the TLS hand shake has not done, server send the data in plain text. Solution should i wait here until isTLSAuthenticated ?? or agsxmpp provide any solution for this??
- //here is my code.
- if (!IsTLSAuthenticated && StartTLSSupport)
- {
- SendStreamFeatures(StreamFeatures.SSL);
- }
- else if (!IsAuthenticated)
- {
- SendStreamFeatures(StreamFeatures.Sasl);
- }
- else if (!IsBinded && IsAuthenticated)
- {
- SendStreamFeatures(StreamFeatures.Bind);
- }