ecc: Improve gcry_pk_get_curve.
authorWerner Koch <wk@gnupg.org>
Fri, 8 Nov 2013 16:41:42 +0000 (17:41 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 8 Nov 2013 16:41:42 +0000 (17:41 +0100)
commit03aed1acec611362285db5156a6b92c91604fba4
tree9c28e0d10a8a08a3609fc503cbb18bd2dabcf0c8
parente241dde1420475459e32608137829e52748d0212
ecc: Improve gcry_pk_get_curve.

* cipher/ecc-curves.c (_gcry_ecc_fill_in_curve): Factor some code out
to ..
(find_domain_parms_idx): new.
(_gcry_ecc_get_curve): Find by curve name on error.
--

This change allows the use of an input with just the curve name which
can be used to test whether a given curve has been implemented.  Is is
required because due to the "param" flag change the caller usually
does not have the key parameters available.

Signed-off-by: Werner Koch <wk@gnupg.org>
cipher/ecc-curves.c