1. 04 1月, 2016 1 次提交
  2. 15 12月, 2015 1 次提交
  3. 02 12月, 2015 1 次提交
  4. 27 11月, 2015 1 次提交
  5. 10 11月, 2015 1 次提交
  6. 15 10月, 2015 1 次提交
  7. 06 9月, 2015 2 次提交
  8. 04 9月, 2015 1 次提交
    • D
      Revert "OPENSSL_NO_xxx cleanup: RFC3779" · 47bbaa5b
      David Woodhouse 提交于
      This reverts the non-cleanup parts of commit c73ad690. We do actually
      have a reasonable use case for OPENSSL_NO_RFC3779 in the EDK2 UEFI
      build, since we don't have a strspn() function in our runtime environment
      and we don't want the RFC3779 functionality anyway.
      
      In addition, it changes the default behaviour of the Configure script so
      that RFC3779 support isn't disabled by default. It was always disabled
      from when it was first added in 2006, right up until the point where
      OPENSSL_NO_RFC3779 was turned into a no-op, and the code in the
      Configure script was left *trying* to disable it, but not actually
      working.
      Signed-off-by: NRich Salz <rsalz@akamai.com>
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      47bbaa5b
  9. 03 9月, 2015 2 次提交
  10. 02 9月, 2015 1 次提交
    • V
      Better handling of verify param id peername field · a0724ef1
      Viktor Dukhovni 提交于
      Initialize pointers in param id by the book (explicit NULL assignment,
      rather than just memset 0).
      
      In x509_verify_param_zero() set peername to NULL after freeing it.
      
      In x509_vfy.c's internal check_hosts(), avoid potential leak of
      possibly already non-NULL peername.  This is only set when a check
      succeeds, so don't need to do this repeatedly in the loop.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      a0724ef1
  11. 01 9月, 2015 2 次提交
  12. 28 8月, 2015 1 次提交
  13. 14 8月, 2015 1 次提交
  14. 11 8月, 2015 1 次提交
  15. 08 7月, 2015 3 次提交
    • M
      Extend -show_chain option to verify to show more info · 7f3f41d8
      Matt Caswell 提交于
      The -show_chain flag to the verify command line app shows information about
      the chain that has been built. This commit adds the text "untrusted" against
      those certificates that have been used from the untrusted list.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      7f3f41d8
    • M
      Reject calls to X509_verify_cert that have not been reinitialised · aae41f8c
      Matt Caswell 提交于
      The function X509_verify_cert checks the value of |ctx->chain| at the
      beginning, and if it is NULL then it initialises it, along with the value
      of ctx->untrusted. The normal way to use X509_verify_cert() is to first
      call X509_STORE_CTX_init(); then set up various parameters etc; then call
      X509_verify_cert(); then check the results; and finally call
      X509_STORE_CTX_cleanup(). The initial call to X509_STORE_CTX_init() sets
      |ctx->chain| to NULL. The only place in the OpenSSL codebase  where
      |ctx->chain| is set to anything other than a non NULL value is in
      X509_verify_cert itself. Therefore the only ways that |ctx->chain| could be
      non NULL on entry to X509_verify_cert is if one of the following occurs:
      1) An application calls X509_verify_cert() twice without re-initialising
      in between.
      2) An application reaches inside the X509_STORE_CTX structure and changes
      the value of |ctx->chain| directly.
      
      With regards to the second of these, we should discount this - it should
      not be supported to allow this.
      
      With regards to the first of these, the documentation is not exactly
      crystal clear, but the implication is that you must call
      X509_STORE_CTX_init() before each call to X509_verify_cert(). If you fail
      to do this then, at best, the results would be undefined.
      
      Calling X509_verify_cert() with |ctx->chain| set to a non NULL value is
      likely to have unexpected results, and could be dangerous. This commit
      changes the behaviour of X509_verify_cert() so that it causes an error if
      |ctx->chain| is anything other than NULL (because this indicates that we
      have not been initialised properly). It also clarifies the associated
      documentation. This is a follow up commit to CVE-2015-1793.
      Reviewed-by: NStephen Henson <steve@openssl.org>
      aae41f8c
    • M
      Fix alternate chains certificate forgery issue · 2aacec8f
      Matt Caswell 提交于
      During certificate verfification, OpenSSL will attempt to find an
      alternative certificate chain if the first attempt to build such a chain
      fails. An error in the implementation of this logic can mean that an
      attacker could cause certain checks on untrusted certificates to be
      bypassed, such as the CA flag, enabling them to use a valid leaf
      certificate to act as a CA and "issue" an invalid certificate.
      
      This occurs where at least one cert is added to the first chain from the
      trust store, but that chain still ends up being untrusted. In that case
      ctx->last_untrusted is decremented in error.
      
      Patch provided by the BoringSSL project.
      
      CVE-2015-1793
      Reviewed-by: NStephen Henson <steve@openssl.org>
      2aacec8f
  16. 11 6月, 2015 1 次提交
  17. 14 5月, 2015 1 次提交
  18. 06 5月, 2015 2 次提交
    • G
      Initialize potentially uninitialized local variables · 4c9b0a03
      Gunnar Kudrjavets 提交于
      Compiling OpenSSL code with MSVC and /W4 results in a number of warnings.
      One category of warnings is particularly interesting - C4701 (potentially
      uninitialized local variable 'name' used). This warning pretty much means
      that there's a code path which results in uninitialized variables being used
      or returned. Depending on compiler, its options, OS, values in registers
      and/or stack, the results can be nondeterministic. Cases like this are very
      hard to debug so it's rational to fix these issues.
      
      This patch contains a set of trivial fixes for all the C4701 warnings (just
      initializing variables to 0 or NULL or appropriate error code) to make sure
      that deterministic values will be returned from all the execution paths.
      
      RT#3835
      Signed-off-by: NMatt Caswell <matt@openssl.org>
      
      Matt's note: All of these appear to be bogus warnings, i.e. there isn't
      actually a code path where an unitialised variable could be used - its just
      that the compiler hasn't been able to figure that out from the logic. So
      this commit is just about silencing spurious warnings.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      4c9b0a03
    • R
      memset, memcpy, sizeof consistency fixes · 16f8d4eb
      Rich Salz 提交于
      Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr)
      for memset and memcpy.  Remove needless casts for those functions.
      For memset, replace alternative forms of zero with 0.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      16f8d4eb
  19. 05 5月, 2015 1 次提交
    • R
      Use safer sizeof variant in malloc · b4faea50
      Rich Salz 提交于
      For a local variable:
              TYPE *p;
      Allocations like this are "risky":
              p = OPENSSL_malloc(sizeof(TYPE));
      if the type of p changes, and the malloc call isn't updated, you
      could get memory corruption.  Instead do this:
              p = OPENSSL_malloc(sizeof(*p));
      Also fixed a few memset() calls that I noticed while doing this.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      b4faea50
  20. 02 5月, 2015 2 次提交
  21. 01 5月, 2015 1 次提交
    • R
      free NULL cleanup 5a · 222561fe
      Rich Salz 提交于
      Don't check for NULL before calling a free routine.  This gets X509_.*free:
          x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free
          X509_STORE_free X509_STORE_CTX_free X509_PKEY_free
          X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      222561fe
  22. 29 4月, 2015 1 次提交
  23. 28 3月, 2015 1 次提交
    • R
      free NULL cleanup · c5ba2d99
      Rich Salz 提交于
      EVP_.*free; this gets:
              EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free
              EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it
              EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup
      Reviewed-by: NKurt Roeckx <kurt@openssl.org>
      c5ba2d99
  24. 25 3月, 2015 1 次提交
    • D
      Fix verify algorithm. · e5991ec5
      Dr. Stephen Henson 提交于
      Disable loop checking when we retry verification with an alternative path.
      This fixes the case where an intermediate CA is explicitly trusted and part
      of the untrusted certificate list. By disabling loop checking for this case
      the untrusted CA can be replaced by the explicitly trusted case and
      verification will succeed.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      e5991ec5
  25. 25 2月, 2015 2 次提交
  26. 09 2月, 2015 2 次提交
  27. 06 2月, 2015 1 次提交
  28. 27 1月, 2015 2 次提交
    • R
      OPENSSL_NO_xxx cleanup: RFC3779 · c73ad690
      Rich Salz 提交于
      Remove OPENSSL_NO_RFCF3779.
      
      Also, makevms.com was ignored by some of the other cleanups, so
      I caught it up.  Sorry I ignored you, poor little VMS...
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      c73ad690
    • R
      OPENSSL_NO_xxx cleanup: many removals · a00ae6c4
      Rich Salz 提交于
      The following compile options (#ifdef's) are removed:
          OPENSSL_NO_BIO OPENSSL_NO_BUFFER OPENSSL_NO_CHAIN_VERIFY
          OPENSSL_NO_EVP OPENSSL_NO_FIPS_ERR OPENSSL_NO_HASH_COMP
          OPENSSL_NO_LHASH OPENSSL_NO_OBJECT OPENSSL_NO_SPEED OPENSSL_NO_STACK
          OPENSSL_NO_X509 OPENSSL_NO_X509_VERIFY
      
      This diff is big because of updating the indents on preprocessor lines.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      a00ae6c4
  29. 22 1月, 2015 2 次提交