1. 19 Mar, 2018 3 commits
    • Pontus Sköldström's avatar
    • Simon Giesecke's avatar
      Merge pull request #3001 from bluca/sodium_global_init · e49a861f
      Simon Giesecke authored
      Problem:  global random init/deinit breaks existing applications
      e49a861f
    • Luca Boccassi's avatar
      Problem: global random init/deinit breaks existing applications · 8f5fc705
      Luca Boccassi authored
      Solution: restrict it only to the original issue #2632, Tweetnacl on
      *NIX when using /dev/urandom, ie: without the new Linux getrandom()
      syscall.
      
      Existing applications might use atexit to register cleanup functions
      (like CZMQ does), and the current change as-is imposes an ordering
      that did not exist before - the context MUST be created BEFORE
      registering the cleanup with atexit. This is a backward incompatible
      change that is reported to cause aborts in some applications.
      
      Although libsodium's documentation says that its initialisation APIs
      is not thread-safe, nobody has ever reported an issue with it, so
      avoiding the global init/deinit in the libsodium case is the less
      risky option we have.
      
      Tweetnacl users on Windows and on Linux with getrandom (glibc 2.25 and
      Linux kernel 3.17) are not affected by the original issue.
      
      Fixes #2991
      8f5fc705
  2. 16 Mar, 2018 8 commits
  3. 15 Mar, 2018 12 commits
  4. 14 Mar, 2018 17 commits