forked from osmocom/wireshark
Bluetooth: SMP: Indicate when keys are Debug
Debug mode keys are described by Bluetooth Core4 specification. Inform user if any of keys are debug. Debug mode is only if both keys are debug. Change-Id: Id7f58c2445614dc386a67b91cbe6f78ffbeda880 Reviewed-on: https://code.wireshark.org/review/19083 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
d59653f8d5
commit
ae989a5d06
|
@ -144,6 +144,20 @@ static const value_string notification_type_vals[] = {
|
|||
{0x0, NULL}
|
||||
};
|
||||
|
||||
static const guint8 debug_public_key_x[32] = {
|
||||
0x20, 0xb0, 0x03, 0xd2, 0xf2, 0x97, 0xbe, 0x2c,
|
||||
0x5e, 0x2c, 0x83, 0xa7, 0xe9, 0xf9, 0xa5, 0xb9,
|
||||
0xef, 0xf4, 0x91, 0x11, 0xac, 0xf4, 0xfd, 0xdb,
|
||||
0xcc, 0x03, 0x01, 0x48, 0x0e, 0x35, 0x9d, 0xe6
|
||||
};
|
||||
|
||||
static const guint8 debug_public_key_y[32] = {
|
||||
0xdc, 0x80, 0x9c, 0x49, 0x65, 0x2a, 0xeb, 0x6d,
|
||||
0x63, 0x32, 0x9a, 0xbf, 0x5a, 0x52, 0x15, 0x5c,
|
||||
0x76, 0x63, 0x45, 0xc2, 0x8f, 0xed, 0x30, 0x24,
|
||||
0x74, 0x1c, 0x8e, 0xd0, 0x15, 0x89, 0xd2, 0x8b
|
||||
};
|
||||
|
||||
void proto_register_btsmp(void);
|
||||
void proto_reg_handoff_btsmp(void);
|
||||
|
||||
|
@ -358,14 +372,20 @@ dissect_btsmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
|||
offset = dissect_btsmp_auth_req(tvb, offset, pinfo, st);
|
||||
break;
|
||||
|
||||
case 0x0C: /* Pairing Public Key */
|
||||
proto_tree_add_item(st, hf_btsmp_public_key_x, tvb, offset, 32, ENC_NA);
|
||||
case 0x0C: /* Pairing Public Key */ {
|
||||
proto_item *sub_item;
|
||||
|
||||
sub_item = proto_tree_add_item(st, hf_btsmp_public_key_x, tvb, offset, 32, ENC_NA);
|
||||
if (tvb_memeql(tvb, offset, debug_public_key_x, 32) == 0)
|
||||
proto_item_append_text(sub_item, " (Debug Key)");
|
||||
offset += 32;
|
||||
|
||||
proto_tree_add_item(st, hf_btsmp_public_key_y, tvb, offset, 32, ENC_NA);
|
||||
sub_item = proto_tree_add_item(st, hf_btsmp_public_key_y, tvb, offset, 32, ENC_NA);
|
||||
if (tvb_memeql(tvb, offset, debug_public_key_y, 32) == 0)
|
||||
proto_item_append_text(sub_item, " (Debug Key)");
|
||||
offset += 32;
|
||||
|
||||
break;
|
||||
break;}
|
||||
case 0x0D: /* Pairing DHKey Check" */
|
||||
proto_tree_add_item(st, hf_btsmp_dhkey_check, tvb, offset, 16, ENC_NA);
|
||||
offset += 16;
|
||||
|
|
Loading…
Reference in New Issue