-
Notifications
You must be signed in to change notification settings - Fork 61
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
Handle SMP_Security_Request #291
Conversation
bumble/pandora/security.py
Outdated
@@ -294,23 +294,37 @@ async def Secure( | |||
try: | |||
self.log.debug('Pair...') | |||
|
|||
wait_for_security = asyncio.get_running_loop().create_future() | |||
|
|||
def on_pairing(*_: Any) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest: you could use the decorator syntax here:
@connection.on("pairing")
def on_pairing(*_: Any) -> None:
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random chat: If there could be a once-but-destroy-on-leave(just like other local variables' lifecycle) that will be useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See PR #292 for a proposal of how this could be done.
@barbibulle could you please tag a new release after this is merged ? |
Rebased on #293 |
Can you rebase on top of main ? |
Note: It's different from other delegation methods, but this mode looks more "Bumble"(considering the EE).
Alternative: If we still prefer PairingDelegate mode, we may add a
get_security_action(peer_address, auth_req)
method in PairingDelegate, which returns one of the following action, and perform the corresponding action: