[OTR-dev] Active fingerprint context pointer possible issue
dgoulet at ev0ke.net
Wed Nov 21 16:42:31 EST 2012
-----BEGIN PGP SIGNED MESSAGE-----
> On Tue, Nov 20, 2012 at 09:24:17PM -0500, David Goulet wrote:
>> Hi everyone,
>> I came across an unexpected behavior that can be due to my bad
>> understanding or a potential bug so I need help on this one.
>> The Fingerprint struct contains this:
>> struct context *context; /* The context to which we belong */
>> Of what I can understand, for a given context pointer
>> (ConnContext *ctx), this is suppose to be equal:
>> ctx == ctx->active_fingerprint->context
>> I found out that this is not exactly true. In the "gone_secure"
>> callback, the context is passed as an argument but the above
>> supposition is not true i.e. the active_fingerprint->context is
>> NOT the same as the argument context but still a valid
>> ConnContext pointer.
>> The issue here is if someone is trying to look the
>> OtrlMessageState using the active fingerprint context, it's set
>> to OTRL_MSGSTATE_PLAINTEXT but the gone_secure context is of
>> course set to encrypted.
>> So, am I missing something here ?
>> I can confirm this with the pidgin-otr plugin and the code I'm
>> doing as well.
>> Thanks a lot people! David
> 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?
> - Ian _______________________________________________ OTR-dev
> mailing list OTR-dev at lists.cypherpunks.ca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the OTR-dev