ecc: Correctly return an error.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 24 Jun 2019 02:15:04 +0000 (11:15 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 24 Jun 2019 02:15:04 +0000 (11:15 +0900)
commitb4a1114dc77617f0e772ddc4faf8820399b4354a
tree0857ebabaefcb443f6cbecf73875e1caf47a0b44
parent6934711d572e13e9e78fb2c53bb119034b088c5a
ecc: Correctly return an error.

* cipher/ecc-ecdh.c (_gcry_ecc_get_algo_keylen): Return 0 for
unknow algorithm.
(_gcry_ecc_mul_point): Return GPG_ERR_UNSUPPORTED_ALGORITHM for
GCRY_ECC_CURVE448 for now.
Return GPG_ERR_UNKNOWN_ALGORITHM, otherwise.

--

Suggested-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
cipher/ecc-ecdh.c