Rework the logic in ECDSA sign_sig()
authortb <tb@openbsd.org>
Mon, 3 Jul 2023 13:53:54 +0000 (13:53 +0000)
committertb <tb@openbsd.org>
Mon, 3 Jul 2023 13:53:54 +0000 (13:53 +0000)
commit0df1a5ef3fb1ec6a932b5ebc0a4f2a25ff2b10eb
tree46dbde56e393f97027fecedb9934ee1c5471bd03
parent03c8fe6abc17e7e068928ad55aee1415706debd7
Rework the logic in ECDSA sign_sig()

If the caller supplied both kinv and r, we don't loop but rather throw
an undocumented error code that no one uses, which is intended to tell
the caller to run ECDSA_sign_setup() and try again.

Use a boolean that indicates this situation so that the logic becomes
a bit more transparent.

ok jsing
lib/libcrypto/ecdsa/ecs_ossl.c