Bluetooth: Add key size checks for SMP
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Tue, 14 Jun 2011 16:37:42 +0000 (13:37 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 14 Jun 2011 17:54:10 +0000 (14:54 -0300)
commit3158c50c33c1acddcfa3c57fab812435aa459750
tree24c74d141b44a26e788f4ce0e22767fd28ba9720
parent5d3de7df18077a0f508ae2c3e3f1866da65fdffd
Bluetooth: Add key size checks for SMP

This patch implements a check in smp cmd pairing request and pairing
response to verify if encryption key maximum size is compatible in both
slave and master when SMP Pairing is requested. Keys are also masked to
the correct negotiated size.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
include/net/bluetooth/l2cap.h
include/net/bluetooth/smp.h
net/bluetooth/smp.c