Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libotr
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 50
    • Issues 50
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Libraries
  • libotr
  • Issues
  • #31

Closed
Open
Created Apr 01, 2016 by TomekWasilczyk@twasilczyk

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):

  1. prepare a fresh environment (without any keys generated at both sides)
  2. client A: ask to enable OTR
  3. keys (for A and B) are generated and OTR conversation is enabled

Actual behavior (for multi-threaded app):

  1. prepare a fresh environment
  2. client A: ask to enable OTR
  3. key is generated for client A (and nothing else happens)
  4. client A: ask to enable OTR again
  5. key is generated for client B (and still nothing else happens)
  6. client A: ask to enable OTR for the third time
  7. 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 an admin enable hashed storage. More information
Assignee
Assign to
Time tracking