diff options
author | Mariusz Skamra <mariusz.skamra@tieto.com> | 2015-05-11 14:49:45 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-05-19 16:42:43 +0200 |
commit | b576fa4d336386d12e7e460b6530db9092d03d69 (patch) | |
tree | 3b23311dbecaf8f5aba474ba74504ebdae358e63 /attrib | |
parent | c895e5ae5b40bdad2333eb4e025f9d7f8f87902c (diff) | |
download | bluez-b576fa4d336386d12e7e460b6530db9092d03d69.tar.gz |
shared/att: Add ext_signed flag to be able to use external crypto
Due to the issues with CSRK tests ext_signed flag has been added to
allow android/gatt handle signed write operations.
This patch fixes following tests:
GAP__TC_SEC_CSIGN_BV_02_C
GAP__TC_SEC_CSIGN_BI_01_C
GAP__TC_SEC_CSIGN_BI_02_C
GAP__TC_SEC_CSIGN_BI_03_C
GAP__TC_SEC_CSIGN_BI_04_C
SM__TC_SIGN_BV_03_C
Diffstat (limited to 'attrib')
-rw-r--r-- | attrib/gattrib.c | 4 | ||||
-rw-r--r-- | attrib/gattrib.h | 2 | ||||
-rw-r--r-- | attrib/gatttool.c | 2 | ||||
-rw-r--r-- | attrib/interactive.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/attrib/gattrib.c b/attrib/gattrib.c index 201135961..2e1e39ac6 100644 --- a/attrib/gattrib.c +++ b/attrib/gattrib.c @@ -95,7 +95,7 @@ static struct id_pair *store_id(GAttrib *attrib, unsigned int org_id, return NULL; } -GAttrib *g_attrib_new(GIOChannel *io, guint16 mtu) +GAttrib *g_attrib_new(GIOChannel *io, guint16 mtu, bool ext_signed) { gint fd; GAttrib *attr; @@ -111,7 +111,7 @@ GAttrib *g_attrib_new(GIOChannel *io, guint16 mtu) g_io_channel_ref(io); attr->io = io; - attr->att = bt_att_new(fd); + attr->att = bt_att_new(fd, ext_signed); if (!attr->att) goto fail; diff --git a/attrib/gattrib.h b/attrib/gattrib.h index 374bac2dd..611f95260 100644 --- a/attrib/gattrib.h +++ b/attrib/gattrib.h @@ -42,7 +42,7 @@ typedef void (*GAttribDebugFunc)(const char *str, gpointer user_data); typedef void (*GAttribNotifyFunc)(const guint8 *pdu, guint16 len, gpointer user_data); -GAttrib *g_attrib_new(GIOChannel *io, guint16 mtu); +GAttrib *g_attrib_new(GIOChannel *io, guint16 mtu, bool ext_signed); GAttrib *g_attrib_ref(GAttrib *attrib); void g_attrib_unref(GAttrib *attrib); diff --git a/attrib/gatttool.c b/attrib/gatttool.c index 1a40c943a..95bd20a63 100644 --- a/attrib/gatttool.c +++ b/attrib/gatttool.c @@ -148,7 +148,7 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data) if (cid == ATT_CID) mtu = ATT_DEFAULT_LE_MTU; - attrib = g_attrib_new(io, mtu); + attrib = g_attrib_new(io, mtu, false); if (opt_listen) g_idle_add(listen_start, attrib); diff --git a/attrib/interactive.c b/attrib/interactive.c index 451be23fb..7d4786ac9 100644 --- a/attrib/interactive.c +++ b/attrib/interactive.c @@ -174,7 +174,7 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data) if (cid == ATT_CID) mtu = ATT_DEFAULT_LE_MTU; - attrib = g_attrib_new(iochannel, mtu); + attrib = g_attrib_new(iochannel, mtu, false); g_attrib_register(attrib, ATT_OP_HANDLE_NOTIFY, GATTRIB_ALL_HANDLES, events_handler, attrib, NULL); g_attrib_register(attrib, ATT_OP_HANDLE_IND, GATTRIB_ALL_HANDLES, |