Changeset 508588a for otr.c


Ignore:
Timestamp:
2010-10-07T06:32:06Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
27b407f
Parents:
25b5a4a (diff), 3ad8036 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging smpq fix from pesco.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    r25b5a4a r508588a  
    11291129                        otrl_sm_state_free(context->smstate);
    11301130                } else {
    1131                         /* SMP3 received, otrl_message_receiving will have sent SMP4 and set fp trust */
    1132                         /* as noted above, fp trust SHOULD have been set by libotr.
    1133                          * however at least version 3.2.0 seems to forget it when
    1134                          * responding to an smp session that was initiated with SMP1Q
    1135                          * (question and answer); other cases appear to work fine.
    1136                          * as a workaround, we explicitly set it below.
    1137                          */
     1131                        /* SMP3 received, otrl_message_receiving will have sent SMP4 */
    11381132                        if(context->smstate->sm_prog_state == OTRL_SMP_PROG_SUCCEEDED) {
    1139                                 otrl_context_set_trust(context->active_fingerprint, "smp");
    1140                                 irc_usermsg(irc, "smp %s: secrets proved equal, fingerprint trusted",
    1141                                         u->nick);
     1133                                if(context->smstate->received_question) {
     1134                                        irc_usermsg(irc, "smp %s: correct answer, you are trusted",
     1135                                                u->nick);
     1136                                } else {
     1137                                        irc_usermsg(irc, "smp %s: secrets proved equal, fingerprint trusted",
     1138                                                u->nick);
     1139                                }
    11421140                        } else {
    1143                                 otrl_context_set_trust(context->active_fingerprint, "");
    1144                                 irc_usermsg(irc, "smp %s: secrets did not match, fingerprint not trusted",
    1145                                         u->nick);
     1141                                if(context->smstate->received_question) {
     1142                                        irc_usermsg(irc, "smp %s: wrong answer, you are not trusted",
     1143                                                u->nick);
     1144                                } else {
     1145                                        irc_usermsg(irc, "smp %s: secrets did not match, fingerprint not trusted",
     1146                                                u->nick);
     1147                                }
    11461148                        }
    11471149                        otrl_sm_state_free(context->smstate);
Note: See TracChangeset for help on using the changeset viewer.