| 16 | | |
| 17 | | def show_sas_dialog(session, jid, sas, on_success): |
| 18 | | def success_cb(checked): |
| 19 | | on_success(checked) |
| 20 | | |
| 21 | | def failure_cb(): |
| 22 | | session.reject_negotiation() |
| 23 | | |
| 24 | | dialogs.ConfirmationDialogCheck(_('''OK to continue with negotiation?'''), |
| 25 | | _('''You've begun an encrypted session with %s, but it can't be guaranteed that you're talking directly to the person you think you are. |
| 26 | | |
| 27 | | You should speak with them directly (in person or on the phone) and confirm that their Short Authentication String is identical to this one: %s |
| 28 | | |
| 29 | | Would you like to continue with the encrypted session?''') % (jid, sas), |
| 30 | | |
| 31 | | _('Yes, I verified the Short Authentication String'), |
| 32 | | on_response_ok=success_cb, on_response_cancel=failure_cb, is_modal=False) |