[OTR-dev] How to properly detect the end of the AKE?

Ian Goldberg ian at cypherpunks.ca
Wed Oct 30 19:04:23 EDT 2013


On Wed, Oct 30, 2013 at 06:58:24PM +0100, Thomas Balthazar wrote:
> Thanks for your answer, Ian.
> I was wondering if there was a specific callback or method to detect
> the AAMS message "elegantly" but I guess I'll just test if the string
> starts with "?OTR:AAMS" then.

I think the more "elegant" way is exactly to use the gone_secure
callback to set a flag in your opdata structure.  If that flag is set,
then sending the message you have in your hand will cause the other side
to go secure.  Note that if you *are* the other side (you're receiving
the AAMS message), then "the message in your hand" should be NULL, and
the statement is still true.

   - Ian



More information about the OTR-dev mailing list