2011-12-13 23:57:30

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

Some profiles specify some restriction depending on the length
of the key used to encrypt the link, this adds an way to retrieve
that value from the kernel.

Current kernels don't provide this information so the size is
always zero.
---
btio/btio.c | 21 +++++++++++++++++++++
btio/btio.h | 1 +
lib/bluetooth.h | 1 +
3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/btio/btio.c b/btio/btio.c
index 0d177a3..5641a9c 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -513,6 +513,22 @@ static int set_priority(int sock, uint32_t prio)
return 0;
}

+static gboolean get_key_size(int sock, BtIOType type, int *size,
+ GError **err)
+{
+ struct bt_security sec;
+ socklen_t len;
+
+ memset(&sec, 0, sizeof(sec));
+ len = sizeof(sec);
+ if (getsockopt(sock, SOL_BLUETOOTH, BT_SECURITY, &sec, &len) == 0) {
+ *size = sec.key_size;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static gboolean l2cap_set(int sock, int sec_level, uint16_t imtu,
uint16_t omtu, uint8_t mode, int master,
int flushable, uint32_t priority, GError **err)
@@ -880,6 +896,11 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,
va_arg(args, int *), err))
return FALSE;
break;
+ case BT_IO_OPT_KEY_SIZE:
+ if (!get_key_size(sock, BT_IO_L2CAP,
+ va_arg(args, int *), err))
+ return FALSE;
+ break;
case BT_IO_OPT_PSM:
*(va_arg(args, uint16_t *)) = src.l2_psm ?
btohs(src.l2_psm) : btohs(dst.l2_psm);
diff --git a/btio/btio.h b/btio/btio.h
index ae55b61..7e3e130 100644
--- a/btio/btio.h
+++ b/btio/btio.h
@@ -52,6 +52,7 @@ typedef enum {
BT_IO_OPT_DEST_BDADDR,
BT_IO_OPT_DEFER_TIMEOUT,
BT_IO_OPT_SEC_LEVEL,
+ BT_IO_OPT_KEY_SIZE,
BT_IO_OPT_CHANNEL,
BT_IO_OPT_SOURCE_CHANNEL,
BT_IO_OPT_DEST_CHANNEL,
diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 5bd4f03..1dee6df 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -63,6 +63,7 @@ extern "C" {
#define BT_SECURITY 4
struct bt_security {
uint8_t level;
+ uint8_t key_size;
};
#define BT_SECURITY_SDP 0
#define BT_SECURITY_LOW 1
--
1.7.8



2011-12-15 19:18:31

by Vinicius Costa Gomes

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

Hi Johan,

On 13:37 Thu 15 Dec, Johan Hedberg wrote:
> Hi Vinicius,
>
> On Tue, Dec 13, 2011, Vinicius Costa Gomes wrote:
> > --- a/lib/bluetooth.h
> > +++ b/lib/bluetooth.h
> > @@ -63,6 +63,7 @@ extern "C" {
> > #define BT_SECURITY 4
> > struct bt_security {
> > uint8_t level;
> > + uint8_t key_size;
> > };
> > #define BT_SECURITY_SDP 0
> > #define BT_SECURITY_LOW 1
>
> This libbluetooth change will need to be in a separate patch since it
> needs to be backported to hcidump (which now days has a copy of the lib).

Sure.

>
> Johan

Cheers,
--
Vinicius

2011-12-15 11:37:20

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

Hi Vinicius,

On Tue, Dec 13, 2011, Vinicius Costa Gomes wrote:
> --- a/lib/bluetooth.h
> +++ b/lib/bluetooth.h
> @@ -63,6 +63,7 @@ extern "C" {
> #define BT_SECURITY 4
> struct bt_security {
> uint8_t level;
> + uint8_t key_size;
> };
> #define BT_SECURITY_SDP 0
> #define BT_SECURITY_LOW 1

This libbluetooth change will need to be in a separate patch since it
needs to be backported to hcidump (which now days has a copy of the lib).

Johan

2011-12-14 17:02:53

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

Some profiles specify some restriction depending on the length
of the key used to encrypt the link, this adds an way to retrieve
that value from the kernel.

Current kernels don't provide this information so the size is
always zero.
---
btio/btio.c | 19 +++++++++++++++++++
btio/btio.h | 1 +
lib/bluetooth.h | 1 +
3 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/btio/btio.c b/btio/btio.c
index 0d177a3..2d71998 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -513,6 +513,21 @@ static int set_priority(int sock, uint32_t prio)
return 0;
}

+static gboolean get_key_size(int sock, int *size, GError **err)
+{
+ struct bt_security sec;
+ socklen_t len;
+
+ memset(&sec, 0, sizeof(sec));
+ len = sizeof(sec);
+ if (getsockopt(sock, SOL_BLUETOOTH, BT_SECURITY, &sec, &len) == 0) {
+ *size = sec.key_size;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static gboolean l2cap_set(int sock, int sec_level, uint16_t imtu,
uint16_t omtu, uint8_t mode, int master,
int flushable, uint32_t priority, GError **err)
@@ -880,6 +895,10 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,
va_arg(args, int *), err))
return FALSE;
break;
+ case BT_IO_OPT_KEY_SIZE:
+ if (!get_key_size(sock, va_arg(args, int *), err))
+ return FALSE;
+ break;
case BT_IO_OPT_PSM:
*(va_arg(args, uint16_t *)) = src.l2_psm ?
btohs(src.l2_psm) : btohs(dst.l2_psm);
diff --git a/btio/btio.h b/btio/btio.h
index ae55b61..7e3e130 100644
--- a/btio/btio.h
+++ b/btio/btio.h
@@ -52,6 +52,7 @@ typedef enum {
BT_IO_OPT_DEST_BDADDR,
BT_IO_OPT_DEFER_TIMEOUT,
BT_IO_OPT_SEC_LEVEL,
+ BT_IO_OPT_KEY_SIZE,
BT_IO_OPT_CHANNEL,
BT_IO_OPT_SOURCE_CHANNEL,
BT_IO_OPT_DEST_CHANNEL,
diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 5bd4f03..1dee6df 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -63,6 +63,7 @@ extern "C" {
#define BT_SECURITY 4
struct bt_security {
uint8_t level;
+ uint8_t key_size;
};
#define BT_SECURITY_SDP 0
#define BT_SECURITY_LOW 1
--
1.7.8


2011-12-14 16:35:57

by Vinicius Costa Gomes

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

Hi Luiz,

On 14:09 Wed 14 Dec, Luiz Augusto von Dentz wrote:
> Hi Vinicius,
>
> On Wed, Dec 14, 2011 at 1:57 AM, Vinicius Costa Gomes
> <[email protected]> wrote:
> > +static gboolean get_key_size(int sock, BtIOType type, int *size,
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? GError **err)
> > +{
> > + ? ? ? struct bt_security sec;
> > + ? ? ? socklen_t len;
> > +
> > + ? ? ? memset(&sec, 0, sizeof(sec));
> > + ? ? ? len = sizeof(sec);
> > + ? ? ? if (getsockopt(sock, SOL_BLUETOOTH, BT_SECURITY, &sec, &len) == 0) {
> > + ? ? ? ? ? ? ? *size = sec.key_size;
> > + ? ? ? ? ? ? ? return TRUE;
> > + ? ? ? }
> > +
> > + ? ? ? return FALSE;
> > +}
>
> It doesn't seems that the type is used for anything here, so you can
> probably removed it.

True. I will fix it.

>
> --
> Luiz Augusto von Dentz


Cheers,
--
Vinicius

2011-12-14 13:56:27

by Vinicius Costa Gomes

[permalink] [raw]
Subject: Re: [PATCH BlueZ 4/5] Remove the default security level from btio

Hi Chen,

On Wed, Dec 14, 2011 at 8:43 AM, Ganir, Chen <[email protected]> wrote:
> Vinicius
>
>> -----Original Message-----
>> From: [email protected] [mailto:linux-bluetooth-
>> [email protected]] On Behalf Of Vinicius Costa Gomes
>> Sent: Wednesday, December 14, 2011 1:58 AM
>> To: [email protected]
>> Cc: Vinicius Costa Gomes
>> Subject: [PATCH BlueZ 4/5] Remove the default security level from btio
>>
>> The default value of sec_level when setting *any* option
>> using bt_io_set() was BT_SECURITY_MEDIUM. This was causing
>> the security procedure being started in some situations that
>> it should not.
>> ---
>>  btio/btio.c |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/btio/btio.c b/btio/btio.c
>> index 5641a9c..c26a734 100644
>> --- a/btio/btio.c
>> +++ b/btio/btio.c
>> @@ -698,7 +698,6 @@ static gboolean parse_set_opts(struct set_opts
>> *opts, GError **err,
>>       /* Set defaults */
>>       opts->defer = DEFAULT_DEFER_TIMEOUT;
>>       opts->master = -1;
>> -     opts->sec_level = BT_IO_SEC_MEDIUM;
>
> So removing this simply sets the default security level to none ?

Yes. But this is a fix for an API bug, that if I don't want the
security level to increase to medium
when setting an option using btio, I need to specify the security
level on bt_io_set().

>
>>       opts->mode = L2CAP_MODE_BASIC;
>>       opts->flushable = -1;
>>       opts->priority = 0;
>> --
>> 1.7.8
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-
>> bluetooth" in
>> the body of a message to [email protected]
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
> Thanks,
> Chen Ganir
>


Cheers,
--
Vinicius

2011-12-14 12:09:35

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

Hi Vinicius,

On Wed, Dec 14, 2011 at 1:57 AM, Vinicius Costa Gomes
<[email protected]> wrote:
> +static gboolean get_key_size(int sock, BtIOType type, int *size,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? GError **err)
> +{
> + ? ? ? struct bt_security sec;
> + ? ? ? socklen_t len;
> +
> + ? ? ? memset(&sec, 0, sizeof(sec));
> + ? ? ? len = sizeof(sec);
> + ? ? ? if (getsockopt(sock, SOL_BLUETOOTH, BT_SECURITY, &sec, &len) == 0) {
> + ? ? ? ? ? ? ? *size = sec.key_size;
> + ? ? ? ? ? ? ? return TRUE;
> + ? ? ? }
> +
> + ? ? ? return FALSE;
> +}

It doesn't seems that the type is used for anything here, so you can
probably removed it.

--
Luiz Augusto von Dentz

2011-12-14 11:43:47

by Ganir, Chen

[permalink] [raw]
Subject: RE: [PATCH BlueZ 4/5] Remove the default security level from btio

Vinicius

> -----Original Message-----
> From: [email protected] [mailto:linux-bluetooth-
> [email protected]] On Behalf Of Vinicius Costa Gomes
> Sent: Wednesday, December 14, 2011 1:58 AM
> To: [email protected]
> Cc: Vinicius Costa Gomes
> Subject: [PATCH BlueZ 4/5] Remove the default security level from btio
>
> The default value of sec_level when setting *any* option
> using bt_io_set() was BT_SECURITY_MEDIUM. This was causing
> the security procedure being started in some situations that
> it should not.
> ---
> btio/btio.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/btio/btio.c b/btio/btio.c
> index 5641a9c..c26a734 100644
> --- a/btio/btio.c
> +++ b/btio/btio.c
> @@ -698,7 +698,6 @@ static gboolean parse_set_opts(struct set_opts
> *opts, GError **err,
> /* Set defaults */
> opts->defer = DEFAULT_DEFER_TIMEOUT;
> opts->master = -1;
> - opts->sec_level = BT_IO_SEC_MEDIUM;

So removing this simply sets the default security level to none ?

> opts->mode = L2CAP_MODE_BASIC;
> opts->flushable = -1;
> opts->priority = 0;
> --
> 1.7.8
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html


Thanks,
Chen Ganir


2011-12-13 23:57:34

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ 5/5] Fix btio users to not expect a default security level

The users of btio should not expect that btio will set the security
level to medium if it wasn't specified. Now, all the users specfify
the security level needed.
---
audio/avdtp.c | 1 +
audio/gateway.c | 2 ++
audio/headset.c | 1 +
input/device.c | 1 +
network/connection.c | 1 +
serial/port.c | 2 ++
6 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/audio/avdtp.c b/audio/avdtp.c
index d3568ba..cd66fd4 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -2525,6 +2525,7 @@ static GIOChannel *l2cap_connect(struct avdtp *session)
BT_IO_OPT_SOURCE_BDADDR, &session->server->src,
BT_IO_OPT_DEST_BDADDR, &session->dst,
BT_IO_OPT_PSM, AVDTP_PSM,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_INVALID);
if (!io) {
error("%s", err->message);
diff --git a/audio/gateway.c b/audio/gateway.c
index 9b1aab3..bde3e02 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -501,6 +501,7 @@ static void get_record_cb(sdp_list_t *recs, int err, gpointer user_data)
io = bt_io_connect(BT_IO_RFCOMM, rfcomm_connect_cb, dev, NULL, &gerr,
BT_IO_OPT_SOURCE_BDADDR, &dev->src,
BT_IO_OPT_DEST_BDADDR, &dev->dst,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_CHANNEL, ch,
BT_IO_OPT_INVALID);
if (!io) {
@@ -847,6 +848,7 @@ unsigned int gateway_request_stream(struct audio_device *dev,
io = bt_io_connect(BT_IO_SCO, sco_connect_cb, dev, NULL, &err,
BT_IO_OPT_SOURCE_BDADDR, &dev->src,
BT_IO_OPT_DEST_BDADDR, &dev->dst,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_INVALID);
if (!io) {
error("%s", err->message);
diff --git a/audio/headset.c b/audio/headset.c
index 6aef6a8..abb9a51 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1624,6 +1624,7 @@ static int rfcomm_connect(struct audio_device *dev, headset_stream_cb_t cb,
BT_IO_OPT_SOURCE_BDADDR, &dev->src,
BT_IO_OPT_DEST_BDADDR, &dev->dst,
BT_IO_OPT_CHANNEL, hs->rfcomm_ch,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_INVALID);

hs->rfcomm_ch = -1;
diff --git a/input/device.c b/input/device.c
index a1ecdd7..0ab63c0 100644
--- a/input/device.c
+++ b/input/device.c
@@ -368,6 +368,7 @@ static gboolean rfcomm_connect(struct input_conn *iconn, GError **err)
NULL, err,
BT_IO_OPT_SOURCE_BDADDR, &idev->src,
BT_IO_OPT_DEST_BDADDR, &idev->dst,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_INVALID);
if (!io)
return FALSE;
diff --git a/network/connection.c b/network/connection.c
index ca1f4b2..f864972 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -373,6 +373,7 @@ static DBusMessage *connection_connect(DBusConnection *conn,
BT_IO_OPT_SOURCE_BDADDR, &peer->src,
BT_IO_OPT_DEST_BDADDR, &peer->dst,
BT_IO_OPT_PSM, BNEP_PSM,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_OMTU, BNEP_MTU,
BT_IO_OPT_IMTU, BNEP_MTU,
BT_IO_OPT_INVALID);
diff --git a/serial/port.c b/serial/port.c
index 5b76d14..36e3bd6 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -422,6 +422,7 @@ static void get_record_cb(sdp_list_t *recs, int err, gpointer user_data)
BT_IO_OPT_SOURCE_BDADDR, &device->src,
BT_IO_OPT_DEST_BDADDR, &device->dst,
BT_IO_OPT_CHANNEL, port->channel,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_INVALID);
if (!port->io) {
error("%s", gerr->message);
@@ -462,6 +463,7 @@ connect:
BT_IO_OPT_SOURCE_BDADDR, &device->src,
BT_IO_OPT_DEST_BDADDR, &device->dst,
BT_IO_OPT_CHANNEL, port->channel,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_INVALID);
if (port->io == NULL)
return -EIO;
--
1.7.8


2011-12-13 23:57:33

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ 4/5] Remove the default security level from btio

The default value of sec_level when setting *any* option
using bt_io_set() was BT_SECURITY_MEDIUM. This was causing
the security procedure being started in some situations that
it should not.
---
btio/btio.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/btio/btio.c b/btio/btio.c
index 5641a9c..c26a734 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -698,7 +698,6 @@ static gboolean parse_set_opts(struct set_opts *opts, GError **err,
/* Set defaults */
opts->defer = DEFAULT_DEFER_TIMEOUT;
opts->master = -1;
- opts->sec_level = BT_IO_SEC_MEDIUM;
opts->mode = L2CAP_MODE_BASIC;
opts->flushable = -1;
opts->priority = 0;
--
1.7.8


2011-12-13 23:57:32

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ 3/5] Add support for btiotest to returning the key size

---
test/btiotest.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/test/btiotest.c b/test/btiotest.c
index f02711d..03f026d 100644
--- a/test/btiotest.c
+++ b/test/btiotest.c
@@ -135,6 +135,19 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data)
printf("imtu=%u, omtu=%u\n", imtu, omtu);
}

+ if (data->type == BT_IO_L2CAP) {
+ uint8_t key_size;
+
+ if (!bt_io_get(io, data->type, &err,
+ BT_IO_OPT_KEY_SIZE, &key_size,
+ BT_IO_OPT_INVALID)) {
+ printf("Unable to get L2CAP Key size: %s\n",
+ err->message);
+ g_clear_error(&err);
+ } else
+ printf("key_size=%u\n", key_size);
+ }
+
if (data->disconn == 0) {
g_io_channel_shutdown(io, TRUE, NULL);
printf("Disconnected\n");
--
1.7.8


2011-12-13 23:57:31

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ 2/5] Add support for passing the CID to btiotest

---
test/btiotest.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/test/btiotest.c b/test/btiotest.c
index 91fc1d5..f02711d 100644
--- a/test/btiotest.c
+++ b/test/btiotest.c
@@ -225,8 +225,8 @@ static void confirm_cb(GIOChannel *io, gpointer user_data)
}

static void l2cap_connect(const char *src, const char *dst, uint16_t psm,
- gint disconn, gint sec,
- gint prio)
+ uint16_t cid, gint disconn,
+ gint sec, gint prio)
{
struct io_data *data;
GError *err = NULL;
@@ -242,6 +242,7 @@ static void l2cap_connect(const char *src, const char *dst, uint16_t psm,
BT_IO_OPT_SOURCE, src,
BT_IO_OPT_DEST, dst,
BT_IO_OPT_PSM, psm,
+ BT_IO_OPT_CID, cid,
BT_IO_OPT_SEC_LEVEL, sec,
BT_IO_OPT_PRIORITY, prio,
BT_IO_OPT_INVALID);
@@ -251,6 +252,7 @@ static void l2cap_connect(const char *src, const char *dst, uint16_t psm,
&err,
BT_IO_OPT_DEST, dst,
BT_IO_OPT_PSM, psm,
+ BT_IO_OPT_CID, cid,
BT_IO_OPT_SEC_LEVEL, sec,
BT_IO_OPT_PRIORITY, prio,
BT_IO_OPT_INVALID);
@@ -470,6 +472,7 @@ static gint opt_accept = DEFAULT_ACCEPT_TIMEOUT;
static gint opt_sec = 0;
static gboolean opt_master = FALSE;
static gint opt_priority = 0;
+static gint opt_cid = 0;

static GMainLoop *main_loop;

@@ -478,6 +481,8 @@ static GOptionEntry options[] = {
"RFCOMM channel" },
{ "psm", 'p', 0, G_OPTION_ARG_INT, &opt_psm,
"L2CAP PSM" },
+ { "cid", 'j', 0, G_OPTION_ARG_INT, &opt_cid,
+ "L2CAP CID" },
{ "sco", 's', 0, G_OPTION_ARG_NONE, &opt_sco,
"Use SCO" },
{ "defer", 'd', 0, G_OPTION_ARG_NONE, &opt_defer,
@@ -522,11 +527,10 @@ int main(int argc, char *argv[])
opt_accept, opt_reject, opt_disconn, opt_defer, opt_sec,
opt_priority);

- if (opt_psm) {
+ if (opt_psm || opt_cid) {
if (argc > 1)
- l2cap_connect(opt_dev, argv[1], opt_psm,
- opt_disconn, opt_sec,
- opt_priority);
+ l2cap_connect(opt_dev, argv[1], opt_psm, opt_cid,
+ opt_disconn, opt_sec, opt_priority);
else
l2cap_listen(opt_dev, opt_psm, opt_defer, opt_reject,
opt_disconn, opt_accept, opt_sec,
--
1.7.8


2012-01-23 11:15:28

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

Hi Lizardo,

On Sun, Jan 22, 2012, Anderson Lizardo wrote:
> On Thu, Dec 15, 2011 at 3:18 PM, Vinicius Costa Gomes
> <[email protected]> wrote:
> > Hi Johan,
> >
> > On 13:37 Thu 15 Dec, Johan Hedberg wrote:
> >> Hi Vinicius,
> >>
> >> On Tue, Dec 13, 2011, Vinicius Costa Gomes wrote:
> >> > --- a/lib/bluetooth.h
> >> > +++ b/lib/bluetooth.h
> >> > @@ -63,6 +63,7 @@ extern "C" {
> >> > ?#define BT_SECURITY ? ? ? ?4
> >> > ?struct bt_security {
> >> > ? ? uint8_t level;
> >> > + ? uint8_t key_size;
> >> > ?};
> >> > ?#define BT_SECURITY_SDP ? ? ? ? ? ?0
> >> > ?#define BT_SECURITY_LOW ? ? ? ? ? ?1
> >>
> >> This libbluetooth change will need to be in a separate patch since it
> >> needs to be backported to hcidump (which now days has a copy of the lib).
> >
> > Sure.
>
> I believe this series has not been applied yet due to this pending patch. Right?

Yes, that's correct.

Johan

2012-01-22 20:29:06

by Anderson Lizardo

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

Hi,

On Thu, Dec 15, 2011 at 3:18 PM, Vinicius Costa Gomes
<[email protected]> wrote:
> Hi Johan,
>
> On 13:37 Thu 15 Dec, Johan Hedberg wrote:
>> Hi Vinicius,
>>
>> On Tue, Dec 13, 2011, Vinicius Costa Gomes wrote:
>> > --- a/lib/bluetooth.h
>> > +++ b/lib/bluetooth.h
>> > @@ -63,6 +63,7 @@ extern "C" {
>> > ?#define BT_SECURITY ? ? ? ?4
>> > ?struct bt_security {
>> > ? ? uint8_t level;
>> > + ? uint8_t key_size;
>> > ?};
>> > ?#define BT_SECURITY_SDP ? ? ? ? ? ?0
>> > ?#define BT_SECURITY_LOW ? ? ? ? ? ?1
>>
>> This libbluetooth change will need to be in a separate patch since it
>> needs to be backported to hcidump (which now days has a copy of the lib).
>
> Sure.

I believe this series has not been applied yet due to this pending patch. Right?

Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil