-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Ian,
Yes I figured after sending the last email that it might be confusing on what I'm trying to do :). Here goes. I'm currently working on the Irssi OTR module and I added a command to forget a given fingerprint. So either the user does the command within the chat window where for this case I have access to the OTR context so no need to pass a fingerprint to the command or the user specifies the human readable form of the fingerprint. (available fingerprints can be listed using an other command.) With the later, the only thing I have is the string fingerprint (fp) so, for now, the only solution I came up with is to iterate over all OTR contexts of the user state for which I iterate over all fps and try to match the fp using the otrl_privkey_hash_to_human() and, on match, using otrl_context_find_fingerprint() for the fp object pointer. Once getting this pointer, I have to check to see if this fp is NOT in an ENCRYPTED context before forgetting it. Here lies my problem, the fp->context always point to the m_context which does not indicates me the right message state. For now, I've fixed my problem by returning back the context of the fp previously found with otrl_context_find_fingerprint() but I guess I should be able to access all associated context(s) of the fp and make sure it's safe to forget it? I guess, iterating on them starting with m_context->next ? TBH, I'm just confused on how to proceed safely. Hope this is clearer :) Thanks a lot! David Ian Goldberg: > On Wed, Nov 21, 2012 at 04:42:31PM -0500, David Goulet wrote: >>> Is the issue that active_fingerprint->context is pointing to >>> the master context? (i.e. is ctx->m_context == >>> ctx->active_fingerprint->context ?) If not, can you tell where >>> it is pointing? >> >> Yes it is! >> >> So, what's the procedure here if I want to get the "current" >> context of the active fingerprint to verify it's message state? >> >> Thanks! David > > David, > > Can you say a little more about what you're trying to do? I'm not > sure I follow. You're in a gone_secure callback, and you want to > make sure you really are in ENCRYPTED? I would hope that would > always be true, but just looking at ctx directly would tell you. > How does the active fingerprint fit in? > > Thanks, > > - Ian > > [Note that I will be offline pretty much the rest of today, for > reasons obvious to people in the US. ;-) ] > _______________________________________________ OTR-dev mailing > list OTR-dev@lists.cypherpunks.ca > http://lists.cypherpunks.ca/mailman/listinfo/otr-dev -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBCgAGBQJQrjbDAAoJEELoaioR9I02JfYH/i+bkxycQSDueGheHkp/11iO fvPn2euBWRT9lYOitxIy9bhU2R9hDFhD2Itgo4Ws+f8JmYbtug2QONz2HI42S6w1 72lXCRpiVLyly28y6NPx627j2JfU50GkFZBNVP6i5a7p4VSs8Bc4qfaUQIxH4C2o sIh7b6v9ssNesTsg/oH5lwm14FFrViJ3OM7VTYcqJ08aODrgITftNl4l4pXXz25y vJVnuYVwCr/1njrNCBG1N66oZaw5pD+OfYtdHk7x3A55JvfmWrXCLgeXDmweGc6V jlkQfzuNEE0waJsD1t0mnJH6bIN8t9DGebr+XbKY8+q77Di2aB9lSfnD8Yn+Jc0= =0cE1 -----END PGP SIGNATURE----- _______________________________________________ OTR-dev mailing list OTR-dev@lists.cypherpunks.ca http://lists.cypherpunks.ca/mailman/listinfo/otr-dev