summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2017-04-30 06:51:40 -0700
committerJohan Hedberg <johan.hedberg@intel.com>2017-04-30 16:52:39 +0300
commitf958315358bc37aede49dc3cd7e27e037994ae84 (patch)
tree5d2f413a50c0895cc326fc854bf47c2b34fac8f4 /net/bluetooth
parent2d6f1da168e1d62c47f7d50135ac4cbd8411dcb1 (diff)
Bluetooth: zero kpp input for key generation
When generating new ECDH keys with kpp, the shared secret input needs to be set to NULL. Fix this by including kpp_request_set_input call. Fixes: 58771c1c ("Bluetooth: convert smp and selftest to crypto kpp API") Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/ecdh_helper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/ecdh_helper.c b/net/bluetooth/ecdh_helper.c
index 579684bfc322..2a65ca3fa8fa 100644
--- a/net/bluetooth/ecdh_helper.c
+++ b/net/bluetooth/ecdh_helper.c
@@ -191,6 +191,7 @@ bool generate_ecdh_keys(u8 public_key[64], u8 private_key[32])
goto free_all;
sg_init_one(&dst, tmp, 64);
+ kpp_request_set_input(req, NULL, 0);
kpp_request_set_output(req, &dst, 64);
kpp_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
ecdh_complete, &result);