tokio-xmpp: Refactor to provide channel-binding for ktls
Instead of having a second method to fetch channel-binding from the TlsStream, do it directly in the connect() method, since after that we don’t have enough information to fetch it any longer when using ktls.
This commit is contained in:
parent
7991cef904
commit
897c2abe0b
5 changed files with 61 additions and 77 deletions
|
|
@ -16,7 +16,7 @@ pub async fn component_login<C: ServerConnector>(
|
|||
timeouts: Timeouts,
|
||||
) -> Result<XmppStream<C::Stream>, Error> {
|
||||
let password = password;
|
||||
let mut stream = connector.connect(&jid, ns::COMPONENT, timeouts).await?;
|
||||
let (mut stream, _) = connector.connect(&jid, ns::COMPONENT, timeouts).await?;
|
||||
let header = stream.take_header();
|
||||
let mut stream = stream.skip_features();
|
||||
let stream_id = match header.id {
|
||||
|
|
|
|||
Loading…
Reference in a new issue