Fix bug in nistp224/256/521 where have_precompute_mult always returns 0
authorMatt Caswell <matt@openssl.org>
Wed, 4 Nov 2015 17:30:22 +0000 (17:30 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 29 Jan 2016 13:07:10 +0000 (13:07 +0000)
commite94f52e0c70dc42f5de5b7982525f76cfe42fa90
tree3a951b5fe61ff6479b8885de59e9fecdae661c15
parent83ab6e55a1f8de9b3e45d13dcc78eb739dc66dea
Fix bug in nistp224/256/521 where have_precompute_mult always returns 0

During precomputation if the group given is well known then we memcpy a
well known precomputation. However we go the wrong label in the code and
don't store the data properly. Consequently if we call have_precompute_mult
the data isn't there and we return 0.

RT#3600

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 615614c8862fb89dcf1551a4e113be0789dddf5f)
crypto/ec/ecp_nistp224.c
crypto/ec/ecp_nistp256.c
crypto/ec/ecp_nistp521.c