Verified Commit 81a2cd20 authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by Rahix
Browse files

BLE: UART: Enforce encryption and authentication



It is now only possible to use this with encryption and authentication.
Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
parent 2c9fc36c
......@@ -72,7 +72,8 @@ static const attsAttr_t uartAttrCfgList[] = {
.pLen = NULL,
.maxLen = 128,
.settings = ATTS_SET_WRITE_CBACK | ATTS_SET_VARIABLE_LEN,
.permissions = ATTS_PERMIT_WRITE,
.permissions = ATTS_PERMIT_WRITE | ATTS_PERMIT_WRITE_ENC |
ATTS_PERMIT_WRITE_AUTH,
},
/* UART tx characteristic */
{
......@@ -91,7 +92,8 @@ static const attsAttr_t uartAttrCfgList[] = {
.pLen = &uartTxCh_buf_len,
.maxLen = sizeof(uartTxCh_buf),
.settings = ATTS_SET_READ_CBACK,
.permissions = ATTS_PERMIT_READ,
.permissions = ATTS_PERMIT_READ | ATTS_PERMIT_READ_ENC |
ATTS_PERMIT_READ_AUTH,
},
/* UART tx CCC descriptor */
{
......@@ -100,7 +102,9 @@ static const attsAttr_t uartAttrCfgList[] = {
.pLen = NULL,
.maxLen = 0,
.settings = ATTS_SET_CCC,
.permissions = ATTS_PERMIT_READ | ATTS_PERMIT_WRITE,
.permissions = ATTS_PERMIT_WRITE | ATTS_PERMIT_WRITE_ENC |
ATTS_PERMIT_WRITE_AUTH | ATTS_PERMIT_READ |
ATTS_PERMIT_READ_ENC | ATTS_PERMIT_READ_AUTH,
},
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment