1. 31 10月, 2017 1 次提交
  2. 18 10月, 2017 1 次提交
    • D
      Fix reseeding issues of the public RAND_DRBG · c16de9d8
      Dr. Matthias St. Pierre 提交于
      Reseeding is handled very differently by the classic RAND_METHOD API
      and the new RAND_DRBG api. These differences led to some problems when
      the new RAND_DRBG was made the default OpenSSL RNG. In particular,
      RAND_add() did not work as expected anymore. These issues are discussed
      on the thread '[openssl-dev] Plea for a new public OpenSSL RNG API'
      and in Pull Request #4328. This commit fixes the mentioned issues,
      introducing the following changes:
      
      - Replace the fixed size RAND_BYTES_BUFFER by a new RAND_POOL API which
        facilitates collecting entropy by the get_entropy() callback.
      - Don't use RAND_poll()/RAND_add() for collecting entropy from the
        get_entropy() callback anymore. Instead, replace RAND_poll() by
        RAND_POOL_acquire_entropy().
      - Add a new function rand_drbg_restart() which tries to get the DRBG
        in an instantiated state by all means, regardless of the current
        state (uninstantiated, error, ...) the DRBG is in. If the caller
        provides entropy or additional input, it will be used for reseeding.
      - Restore the original documented behaviour of RAND_add() and RAND_poll()
        (namely to reseed the DRBG immediately) by a new implementation based
        on rand_drbg_restart().
      - Add automatic error recovery from temporary failures of the entropy
        source to RAND_DRBG_generate() using the rand_drbg_restart() function.
      Reviewed-by: NPaul Dale <paul.dale@oracle.com>
      Reviewed-by: NKurt Roeckx <kurt@roeckx.be>
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      Reviewed-by: NBen Kaduk <kaduk@mit.edu>
      (Merged from https://github.com/openssl/openssl/pull/4328)
      c16de9d8
  3. 13 10月, 2017 1 次提交
  4. 12 10月, 2017 2 次提交
  5. 11 10月, 2017 1 次提交
  6. 14 9月, 2017 2 次提交
  7. 29 8月, 2017 1 次提交
  8. 22 8月, 2017 1 次提交
    • P
      This has been added to avoid the situation where some host ctype.h functions · a1df06b3
      Pauli 提交于
      return true for characters > 127.  I.e. they are allowing extended ASCII
      characters through which then cause problems.  E.g. marking superscript '2' as
      a number then causes the common (ch - '0') conversion to number to fail
      miserably.  Likewise letters with diacritical marks can also cause problems.
      
      If a non-ASCII character set is being used (currently only EBCDIC), it is
      adjusted for.
      
      The implementation uses a single table with a bit for each of the defined
      classes.  These functions accept an int argument and fail for
      values out of range or for characters outside of the ASCII set.  They will
      work for both signed and unsigned character inputs.
      Reviewed-by: NAndy Polyakov <appro@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/4102)
      a1df06b3
  9. 08 8月, 2017 1 次提交
  10. 07 8月, 2017 2 次提交
  11. 03 8月, 2017 1 次提交
  12. 20 7月, 2017 1 次提交
  13. 30 6月, 2017 2 次提交
  14. 29 6月, 2017 2 次提交
  15. 28 6月, 2017 1 次提交
  16. 19 6月, 2017 1 次提交
  17. 15 6月, 2017 1 次提交
  18. 31 5月, 2017 3 次提交
  19. 26 5月, 2017 1 次提交
  20. 02 5月, 2017 1 次提交
  21. 26 4月, 2017 1 次提交
    • D
      Add support for custom signature parameters · 786dd2c2
      Dr. Stephen Henson 提交于
      Many signature types define the digest and public key type by a single OID
      such as ecdsa_with_sha256.
      
      Some types (RSA-PSS for example) use a single OID to indicate the signature
      scheme and additional parameters are encoded in the AlgorithmIdentifier.
      
      Add an X509_SIG_INFO structure to contain details about the signature type:
      specifically the digest algorithm, public key algorithm, security bits and
      various flags. This supports both existing algorithms and more complex
      types.
      
      Add accessors for the structure and a special case that retrieves signature
      information from a certificate.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/3301)
      786dd2c2
  22. 21 4月, 2017 1 次提交
  23. 20 4月, 2017 1 次提交
  24. 28 2月, 2017 1 次提交
  25. 21 2月, 2017 1 次提交
  26. 02 2月, 2017 1 次提交
  27. 25 1月, 2017 1 次提交
  28. 24 1月, 2017 1 次提交
  29. 13 1月, 2017 1 次提交
    • R
      Add "random malloc failure" tooling · f7edeced
      Rich Salz 提交于
      Still needs to be documented, somehow/somewhere.
      
      The env var OPENSSL_MALLOC_FAILURES controls how often malloc/realloc
      should fail.  It's a set of fields separated by semicolons.  Each field
      is a count and optional percentage (separated by @) which defaults to 100.
      If count is zero then it lasts "forever."  For example: 100;@25 means the
      first 100 allocations pass, then the rest have a 25% chance of failing
      until the program exits or crashes.
      
      If env var OPENSSL_MALLOC_FD parses as a positive integer, a record
      of all malloc "shouldfail" tests is written to that file descriptor.
      If a malloc will fail, and OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE is not set
      (platform specific), then a backtrace will be written to the descriptor
      when a malloc fails.  This can be useful because a malloc may fail but
      not be checked, and problems will only occur later.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/1252)
      f7edeced
  30. 08 1月, 2017 2 次提交
  31. 18 11月, 2016 1 次提交
  32. 18 9月, 2016 1 次提交