[OTR-dev] [PATCH] Call gone_insecure op

dequis dx at dxzone.com.ar
Sat Jun 6 03:05:03 EDT 2015


Hi otr-dev.

I was trying to figure out why bitlbee's otr plugin didn't show any
notification when the other side disconnected otr. Soon later I found
that op_gone_insecure was never called, and that there's bug #48 [1]
open for that.

Quoting from that bug:

>Is there a reason why this op is never used anywhere in the code?
>
>Sounds to me like a very important one for IM plugins to know when the session is insecure. Usually, looking got the OTRL_TLV_DISCONNECTED on receive is also fine to understand that the session disconnected but is there cases where we might end up insecure and no TLV message is sent?

Since I don't know the reason, I decided to go ahead and write this
trivial patch, and maybe that will result in an answer to the above
question.

It's just two calls to ops->gone_insecure(), one at the end of
disconnect_context() and one when OTRL_TLV_DISCONNECTED is received,
corresponding to the only two calls of otrl_context_force_finished I
could find (first one through otrl_context_force_plaintext).

Tested with bitlbee-otr and it works.

The patch is attached to this email, and also available in the
"gone_insecure" branch of my github fork [2]

[1]: https://bugs.otr.im/issues/48
[2]: https://github.com/dequis/libotr/tree/gone_insecure
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-call-gone_insecure-op-when-disconnecting-or-disc.patch
Type: text/x-patch
Size: 1087 bytes
Desc: not available
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20150606/4cc2d08f/attachment.bin>


More information about the OTR-dev mailing list