1. 11 Apr, 2019 3 commits
    • Nicola Tuveri's avatar
      Separate the lookup test · ac2b52c6
      Nicola Tuveri authored
      
      
      This fixes the "verifying the alias" case.
      Actually, while working on it, I realized that conceptually we were
      testing the 2 different behaviours of `EC_GROUP_check_named_curve()` at
      the same time, and actually not in the proper way.
      
      I think it's fair to assume that overwriting the curve name for an
      existing group with `NID_undef` could lead to the unexpected behaviour
      we were observing and working around.
      Thus I decided to separate the lookup test in a dedicated simpler test
      that does what the documentation of `EC_GROUP_check_named_curve()`
      suggests: the lookup functionality is meant to find a name for a group
      generated with explicit parameters.
      
      In case an alternative alias is returned by the lookup instead of the
      expected nid, to avoid doing comparisons between `EC_GROUP`s with
      different `EC_METHOD`s, the workaround is to retrieve the `ECPARAMETERS`
      of the "alias group" and create a new explicit parameters group to use
      in `EC_GROUP_cmp()`.
      
      Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/8555)
      ac2b52c6
    • Nicola Tuveri's avatar
      EC_GROUP_set_curve() might fail for arbitrary params · 8d4f150f
      Nicola Tuveri authored
      
      
      Setting arbitrary `p`, `a` or `b` with `EC_GROUP_set_curve()` might fail
      for some `EC_GROUP`s, depending on the internal `EC_METHOD`
      implementation, hence the block of tests verifying that
      `EC_GROUP_check_named_curve()` fails when any of the curve parameters is
      changed is modified to run only if the previous `EC_GROUP_set_curve()`
      call succeeds.
      
      `ERR_set_mark()` and `ERR_pop_to_mark()` are used to avoid littering the
      thread error stack with unrelated errors happened during
      `EC_GROUP_set_curve()`.
      
      Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/8555)
      8d4f150f
    • Shane Lontis's avatar
  2. 10 Apr, 2019 6 commits
  3. 09 Apr, 2019 9 commits
  4. 08 Apr, 2019 4 commits
  5. 07 Apr, 2019 2 commits
  6. 06 Apr, 2019 3 commits
  7. 05 Apr, 2019 8 commits
  8. 04 Apr, 2019 5 commits