[OTR-dev] Active fingerprint context pointer possible issue

David Goulet dgoulet at ev0ke.net
Wed Nov 21 16:42:31 EST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Ian Goldberg:
> 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
> 
> 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?

Thanks!
David

> 
> Thanks,
> 
> - Ian _______________________________________________ OTR-dev
> mailing list OTR-dev at lists.cypherpunks.ca 
> http://lists.cypherpunks.ca/mailman/listinfo/otr-dev
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBCgAGBQJQrUrEAAoJEELoaioR9I02OrAH/ApCK3KGHsV39YxG4FZUUVCt
4UE3Cp+2sdoEEKXLJw3/ASIcvRjdCN/cZhL4xexvmVqH7SPTF0uSH6L1IvpbJazV
Um3uJIidUsiHwCC47osGds3P14d6aprQYq2U/mMAyTtxZcRUCTyZbSBEjILDSRul
WRuYKpkDHdirubpZwF3qPW/wHM6EdZ1LGp4Y/eFyUQCHsUJdBSzu28km7ujFPNlP
wEOQ87AnMLWvGAeV7vnjZroww7ckIQaduKb19d0GrKSObldKp0GlPFXwPXxnF64L
uNpwbhKAEKUgADcER8QFA/4SuunDw7gQrWyxVZyNw0OwzwzcTaBEa9GVjbt4XmI=
=ogc9
-----END PGP SIGNATURE-----



More information about the OTR-dev mailing list