Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    r3ad8036 rfaa75c0e  
    11291129                        otrl_sm_state_free(context->smstate);
    11301130                } else {
    1131                         /* SMP3 received, otrl_message_receiving will have sent SMP4 */
     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                         */
    11321138                        if(context->smstate->sm_prog_state == OTRL_SMP_PROG_SUCCEEDED) {
    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                                 }
     1139                                otrl_context_set_trust(context->active_fingerprint, "smp");
     1140                                irc_usermsg(irc, "smp %s: secrets proved equal, fingerprint trusted",
     1141                                        u->nick);
    11401142                        } else {
    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                                 }
     1143                                otrl_context_set_trust(context->active_fingerprint, "");
     1144                                irc_usermsg(irc, "smp %s: secrets did not match, fingerprint not trusted",
     1145                                        u->nick);
    11481146                        }
    11491147                        otrl_sm_state_free(context->smstate);
Note: See TracChangeset for help on using the changeset viewer.