Key generation in multi-threaded environment breaks OTR handshake
The behavior for empty keypair when establishing an OTR conversation differs for single- and multi-threaded applications. I believe the latter one is just a bug.
Expected behavior (as for single-threaded app):
- prepare a fresh environment (without any keys generated at both sides)
- client A: ask to enable OTR
- keys (for A and B) are generated and OTR conversation is enabled
Actual behavior (for multi-threaded app):
- prepare a fresh environment
- client A: ask to enable OTR
- key is generated for client A (and nothing else happens)
- client A: ask to enable OTR again
- key is generated for client B (and still nothing else happens)
- client A: ask to enable OTR for the third time
- OTR conversation is enabled
For now, libotr drops any actions for keys being generated (because it checks for them just after making a request). I made a patch that implements a queue buffer for these actions, so they are performed just after generating a key. It's almost the same, as in single-threaded version, but the application isn't freezed for the key generation time.
(from redmine: created on 2014-06-10)
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information