From 5ccdc518ab33153625536ad31e7c9466511072ab Mon Sep 17 00:00:00 2001 From: Casper Bonde Date: Fri, 8 May 2015 14:33:58 +0200 Subject: SAP: Make it possible to enforce a 16-digit pin code (2/5) This change enable the posibility to enforce using a 16-digit pin or MITM for a RFCOMM or L2CAP connection. This is needed for the SIM access profile. Change-Id: I4d43eefa76e8abc1bcfad6dfd9004d8e82168bf4 Signed-off-by: Casper Bonde --- include/hardware/bluetooth.h | 2 +- include/hardware/bt_sock.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h index 6f95684..da7f4b8 100644 --- a/include/hardware/bluetooth.h +++ b/include/hardware/bluetooth.h @@ -318,7 +318,7 @@ typedef void (*discovery_state_changed_callback)(bt_discovery_state_t state); /** Bluetooth Legacy PinKey Request callback */ typedef void (*pin_request_callback)(bt_bdaddr_t *remote_bd_addr, - bt_bdname_t *bd_name, uint32_t cod); + bt_bdname_t *bd_name, uint32_t cod, bool min_16_digit); /** Bluetooth SSP Request callback - Just Works & Numeric Comparison*/ /** pass_key - Shall be 0 for BT_SSP_PAIRING_VARIANT_CONSENT & diff --git a/include/hardware/bt_sock.h b/include/hardware/bt_sock.h index 69775e0..5d206d7 100644 --- a/include/hardware/bt_sock.h +++ b/include/hardware/bt_sock.h @@ -22,6 +22,7 @@ __BEGIN_DECLS #define BTSOCK_FLAG_AUTH (1 << 1) #define BTSOCK_FLAG_NO_SDP (1 << 2) #define BTSOCK_FLAG_AUTH_MITM (1 << 3) +#define BTSOCK_FLAG_AUTH_16_DIGIT (1 << 4) typedef enum { BTSOCK_RFCOMM = 1, -- cgit v1.1