diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2011-06-14 18:37:42 +0200 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-14 19:54:10 +0200 |
commit | 3158c50c33c1acddcfa3c57fab812435aa459750 (patch) | |
tree | 24c74d141b44a26e788f4ce0e22767fd28ba9720 /include/net/bluetooth/smp.h | |
parent | Bluetooth: Add support for SMP timeout (diff) | |
download | linux-3158c50c33c1acddcfa3c57fab812435aa459750.tar.xz linux-3158c50c33c1acddcfa3c57fab812435aa459750.zip |
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>
Diffstat (limited to 'include/net/bluetooth/smp.h')
-rw-r--r-- | include/net/bluetooth/smp.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h index 111853ab239a..4fb7d198a876 100644 --- a/include/net/bluetooth/smp.h +++ b/include/net/bluetooth/smp.h @@ -112,6 +112,9 @@ struct smp_cmd_security_req { #define SMP_UNSPECIFIED 0x08 #define SMP_REPEATED_ATTEMPTS 0x09 +#define SMP_MIN_ENC_KEY_SIZE 7 +#define SMP_MAX_ENC_KEY_SIZE 16 + /* SMP Commands */ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level); int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); |