[openssl-dev] [openssl.org #4517] [PATCH] Fix EC_KEY_set_private_key() to call key->group->meth->set_private() [GitHub PR #986]
Kazuki Yamaguchi via RT
rt at openssl.org
Thu Apr 21 13:21:37 UTC 2016
Fix a bug introduced by 6903e2e7e9a4 (Extended EC_METHOD customisation
support., 2016-02-01). key->meth->set_private() is wrongly called where
it should call key->group->meth->set_private().
---
I also created a pull request on GitHub:
- https://github.com/openssl/openssl/pull/986
Thanks,
crypto/ec/ec_key.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index f7948cc..22c6535 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -483,8 +483,8 @@ int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key)
{
if (key->group == NULL || key->group->meth == NULL)
return 0;
- if (key->group->meth->set_private
- && key->meth->set_private(key, priv_key) == 0)
+ if (key->group->meth->set_private != NULL
+ && key->group->meth->set_private(key, priv_key) == 0)
return 0;
if (key->meth->set_private != NULL
&& key->meth->set_private(key, priv_key) == 0)
--
2.8.1.104.g07d5700.dirty
--
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4517
Please log in as guest with password guest if prompted
More information about the openssl-dev
mailing list