diff --git a/ChangeLog b/ChangeLog index d3ca0def273a9e76b221251c36c6a5f9b8c52227..ad89c2ec51dfa0dfa4040a1afc3691053a8966fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2013-04-04 Niels Möller <nisse@lysator.liu.se> + * ecc-point.c (ecc_point_get): Allow NULL x or y, ignore + corresponding coordinate. + * nettle.texinfo (Elliptic curves): Document high-level ECDSA support. diff --git a/ecc-point.c b/ecc-point.c index 4d3489c472c9a26ba1d29998c756940605837f58..82645a79df350b035fd154e506fbde8bf44c8478 100644 --- a/ecc-point.c +++ b/ecc-point.c @@ -84,6 +84,8 @@ void ecc_point_get (const struct ecc_point *p, mpz_t x, mpz_t y) { mp_size_t size = p->ecc->size; - mpz_set_n (x, p->p, size); - mpz_set_n (y, p->p + size, size); + if (x) + mpz_set_n (x, p->p, size); + if (y) + mpz_set_n (y, p->p + size, size); }