1. 24 Jul, 2017 2 commits
    • Richard Levitte's avatar
      test/recipes/80-test_tsa.t: Don't trust 'OPENSSL_CONF' · 9433f9f5
      Richard Levitte authored
      
      
      There's a case when the environment variable OPENSSL_CONF is
      useless...  when cross compiling for mingw and your wine environment
      has an environment variable OPENSSL_CONF.  The latter will override
      anything that's given when starting wine and there make the use of
      that environment variable useless in our tests.
      
      Therefore, we should not trust it, and use explicit '-config' options
      instead.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/3994)
      
      (cherry picked from commit 83e0d090)
      9433f9f5
    • Richard Levitte's avatar
      Simplify Makefile.shared · 8e5cd8b0
      Richard Levitte authored
      
      
      Makefile.shared was designed to figure out static library names,
      shared library names, library version compatibility, import library
      names and the like on its own.  This was a design for pre-1.1.0
      OpenSSL because the main Makefile didn't have all that knowledge.
      
      With 1.1.0, the situation isn't the same, a lot more knowledge is
      included in the main Makefile, and while Makefile.shared did things
      right most of the time (there are some corner cases, such as the
      choice of .sl or .so as DSO extension on some HPUX versions), there's
      still an inherent fragility when one has to keep an eye on
      Makefile.shared to make sure it produces what the main Makefile
      produces.
      
      This change simplifies Makefile.shared by removing all its
      "intelligence" and have it depend entirely on the input from the main
      Makefile instead.  That way, all the naming is driven from
      configuration data.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/3983)
      
      (cherry picked from commit d07abe13)
      8e5cd8b0
  2. 23 Jul, 2017 1 commit
  3. 19 Jul, 2017 2 commits
    • Matt Caswell's avatar
      Remove some dead code · 42aebbd5
      Matt Caswell authored
      
      
      The intention of the removed code was to check if the previous operation
      carried. However this does not work. The "mask" value always ends up being
      a constant and is all ones - thus it has no effect. This check is no longer
      required because of the previous commit.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/3832)
      
      (cherry picked from commit d5475e31)
      42aebbd5
    • Matt Caswell's avatar
      Fix undefined behaviour in e_aes_cbc_hmac_sha256.c and e_aes_cbc_hmac_sha1.c · 6db7d015
      Matt Caswell authored
      
      
      In TLS mode of operation the padding value "pad" is obtained along with the
      maximum possible padding value "maxpad". If pad > maxpad then the data is
      invalid. However we must continue anyway because this is constant time code.
      
      We calculate the payload length like this:
      
          inp_len = len - (SHA_DIGEST_LENGTH + pad + 1);
      
      However if pad is invalid then inp_len ends up -ve (actually large +ve
      because it is a size_t).
      
      Later we do this:
      
          /* verify HMAC */
          out += inp_len;
          len -= inp_len;
      
      This ends up with "out" pointing before the buffer which is undefined
      behaviour. Next we calculate "p" like this:
      
          unsigned char *p =
              out + len - 1 - maxpad - SHA256_DIGEST_LENGTH;
      
      Because of the "out + len" term the -ve inp_len value is cancelled out
      so "p" points to valid memory (although technically the pointer arithmetic
      is undefined behaviour again).
      
      We only ever then dereference "p" and never "out" directly so there is
      never an invalid read based on the bad pointer - so there is no security
      issue.
      
      This commit fixes the undefined behaviour by ensuring we use maxpad in
      place of pad, if the supplied pad is invalid.
      
      With thanks to Brian Carpenter for reporting this issue.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/3832)
      
      (cherry picked from commit 335d0a46)
      6db7d015
  4. 18 Jul, 2017 1 commit
  5. 17 Jul, 2017 1 commit
  6. 14 Jul, 2017 3 commits
  7. 10 Jul, 2017 1 commit
  8. 09 Jul, 2017 1 commit
  9. 07 Jul, 2017 3 commits
  10. 05 Jul, 2017 4 commits
  11. 03 Jul, 2017 1 commit
  12. 01 Jul, 2017 1 commit
  13. 29 Jun, 2017 2 commits
  14. 25 Jun, 2017 1 commit
  15. 22 Jun, 2017 2 commits
  16. 21 Jun, 2017 3 commits
  17. 20 Jun, 2017 4 commits
  18. 19 Jun, 2017 2 commits
  19. 17 Jun, 2017 2 commits
  20. 15 Jun, 2017 3 commits