-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make non-standard SCRAM SHA alogos as opt-in #22
Open
rufferson
wants to merge
41
commits into
TelepathyIM:master
Choose a base branch
from
rufferson:scram-opt-in
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Make auth_registry reusable by cleaning up the handler after successful authentication. - add _peeck_stanza_async call to wocky_xmpp_connection to be able to wait for certain stanza but do not consume it from the reader's queue. - add _resume_async call to wocky_connector which resets connector state, sets sm-resumption vector and launches connect_async - add _continue_async call to wocky_connector to be able to continue normal connection (bind/session) after sm-resume failure.
The resumption is triggered by non-XMPP error (eg. IO) or XMPP EOS To resume it discards current connection, raises `sending` flag (to prevent write attempts) and calls wocky_connector_resume_async on currently stashed connector. When resume_async completes with WockyXmppConnection it clears the `sending` flag and calls receive_stanza which now supposed to read `<resumed/>` nonza, move unacked_queue to sending_queue and flush the sending_queue (and as a side effect resume reading operations). sending_queue flush in turn resumes writing operations. Should reconnection (not resumption) fail it clears `sending` flag which together with absence of connection will trigger reconnection attempt on next heartbeat. Should resumption fail (not-found) the porter then resets porter state (discards queues) and calls _continue_async which completes normal (new) connection vector. If connector appears unset in any of the resumption steps - the step is abandoned - giving upper level control back over the resumption.
Add new signals for each state of resume vector: resuming, resumed, resume-done, resume-failed, reconnected; add new api call wocky_c2s_porter_resume. Signal `resuming` allows handler to prevent automatic resumption vector via connector by returning FALSE. This signal emits resume stanza to allow handler to start resume vector over wocky-connector. Once done - should call wocky_c2s_porter_resume to capture resumed nonza, resync and continue. If left to auto-resume the next checkpoint is resume-fail signal - a recoverable soft-fail where handler may stop auto-recovery by returning FALSE. Handler then need to call wocky_connector_reconnect and create a new session/porter and discard (free) existing. If left to auto-reconnect - the emission of the `reconnected` signal will carry the new connection SID, also change of the full-jid andconnection properties will be `notify::`ed.
h is specified as 32bit unsigned integer while gsize is long thus might be 64bit. Also reset snt_count on resumption and add some debugging to track unacked queue.
This is required to allow gabble-connection to replace connection= bound managers in existing connector if resume fails and we want to continue reusing the connector for future resumptions.
* use portable integer format specifiers: - tests/wocky-sm-test.c - wocky/wocky-c2s-porter.c - wocky/wocky-sasl-scram.c * tests/wocky-test-sasl-auth-server.c: - avoid non init warning - add missing define statement
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It sits on big pile of other patches hence far in the queue. Unless prioritized to rebase.
Closes #15