]> git.ipfire.org Git - thirdparty/openssl.git/commit
EC_GROUP_set_curve() might fail for arbitrary params
authorNicola Tuveri <nic.tuv@gmail.com>
Sun, 31 Mar 2019 13:26:33 +0000 (16:26 +0300)
committerNicola Tuveri <nic.tuv@gmail.com>
Thu, 11 Apr 2019 09:05:38 +0000 (12:05 +0300)
commit8d4f150f70d70d6c3e62661ed7cc16c2f751d8a1
treece1474296d3aa76fb34c923e244e5da97f5c88f7
parent8402cd5f75f8c2f60d8bd39775b24b03dd8b3b38
EC_GROUP_set_curve() might fail for arbitrary params

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: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8555)
test/ectest.c