diff options
author | Andrew Hoang <mail@andrewhoang.me> | 2019-12-23 20:19:24 -0800 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2020-01-05 15:50:11 +0200 |
commit | 26583f6aa8dc28e3598e61db66e54e2fdf8b195f (patch) | |
tree | 55c50f222aa57e57348eb7893fd37e0b0068b04d /crypto/evp/evp_enc.c | |
parent | 6e49b514067a2b6a30d064d2ae1fdfd8050c184b (diff) |
Fix incorrect return code on ECDSA key verification
ECDSA_do_verify() is a function that verifies a ECDSA signature given a hash and a public EC key. The function is supposed to return 1 on valid signature, 0 on invalid signature and -1 on error. Previously, we returned 0 if the key did not have a verify_sig method. This is actually an error case and not an invalid signature. Consequently, this patch updates the return code to -1.
Fixes #8766
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10693)
Diffstat (limited to 'crypto/evp/evp_enc.c')
0 files changed, 0 insertions, 0 deletions