Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New osrandom_engine in C #3229

Merged
merged 12 commits into from
Dec 9, 2016
Merged

New osrandom_engine in C #3229

merged 12 commits into from
Dec 9, 2016

Commits on Dec 6, 2016

  1. New osrandom_engine in C

    Inspired by Python/random.c and the old implementation.
    
    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    e5ebfeb View commit details
    Browse the repository at this point in the history
  2. osrandom_engine

    * Fix naming bug caused by search 'n replace mistake
    * Make it easier to override osrandom auto-detection
    * Add engine ctrl and backend API to get implementation from ENGINE
    
    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    1cf7222 View commit details
    Browse the repository at this point in the history
  3. Better test coverage, documentation, LICENSE

    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    247ea25 View commit details
    Browse the repository at this point in the history
  4. Coverage is hard.

    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    fcec330 View commit details
    Browse the repository at this point in the history
  5. * enable win32 check

    * read() returns size_t
    
    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    cb6f9e2 View commit details
    Browse the repository at this point in the history
  6. remove CCRandomGenerateBytes path and update getentropy to work on macOS

    This change allows us to test all the engines in our CI:
    * getentropy (tested by macOS sierra)
    * getrandom (tested on several linux builders)
    * /dev/urandom (tested on FreeBSD, OS X 10.11 and below, & older linux)
    * CryptGenRandom (tested on windows builders)
    
    I also fixed bugs preventing compilation in the getentropy code
    reaperhulk authored and tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    4bb8742 View commit details
    Browse the repository at this point in the history
  7. Add macOS to spelling list. Remove dead code from header file.

    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    ad2d09e View commit details
    Browse the repository at this point in the history
  8. getentropy() returns int and is restricted to 256 bytes on macOS, too.

    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    158ba3b View commit details
    Browse the repository at this point in the history
  9. add versionadded

    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    086ebbf View commit details
    Browse the repository at this point in the history
  10. Re-add import of os module

    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    f6bc160 View commit details
    Browse the repository at this point in the history
  11. Fixes related to Alex's recent review.

    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 6, 2016
    Configuration menu
    Copy the full SHA
    8575fb2 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2016

  1. Add error reporting and fail for EAGAIN

    Add error reporting strings for various error cases. This gives us much
    nicer and understandable error messages.
    
    SYS_getrandom() EAGAIN is now an error. Cryptography refuses to
    initialize its osrandom engine when the Kernel's CPRNG hasn't been
    seeded yet.
    
    Signed-off-by: Christian Heimes <[email protected]>
    tiran committed Dec 8, 2016
    Configuration menu
    Copy the full SHA
    2abbab4 View commit details
    Browse the repository at this point in the history