gatt client signing

pull/9790/head
paul-szczepanek-arm 2019-02-11 15:19:27 +00:00 committed by Vincent Coubard
parent 3e03c11832
commit 208eb200f1
2 changed files with 6 additions and 5 deletions

View File

@ -159,8 +159,8 @@ public:
* It is used to request the server to write the value of an attribute.
* The server does not acknowledge the status of the operation.
*/
GATT_OP_WRITE_CMD = 0x02,
GATT_OP_WRITE_CMD = 0x02
#if BLE_FEATURE_SIGNING
/**
* Signed Write command.
*
@ -168,7 +168,8 @@ public:
* using a signed packet. The server does not acknowledge the status
* of the operation.
*/
GATT_OP_SIGNED_WRITE_CMD = 0x03
, GATT_OP_SIGNED_WRITE_CMD = 0x03
#endif // BLE_FEATURE_SIGNING
};
/**

View File

@ -1132,8 +1132,8 @@ ble_error_t GenericGattClient<TPalGattClient, SigningMonitorEventHandler>::write
attribute_handle,
make_const_ArrayView(value, length)
);
} else if (cmd == Base::GATT_OP_SIGNED_WRITE_CMD) {
#if BLE_FEATURE_SIGNING
} else if (cmd == Base::GATT_OP_SIGNED_WRITE_CMD) {
if (length > (uint16_t) (mtu - WRITE_HEADER_LENGTH - CMAC_LENGTH - MAC_COUNTER_LENGTH)) {
return BLE_ERROR_PARAM_OUT_OF_RANGE;
}
@ -1148,7 +1148,7 @@ ble_error_t GenericGattClient<TPalGattClient, SigningMonitorEventHandler>::write
}
return status;
#endif // BLE_FEATURE_SIGNING
} else {
} else if (cmd == GattClient::GATT_OP_WRITE_REQ) {
uint8_t* data = NULL;
if (length > (uint16_t) (mtu - WRITE_HEADER_LENGTH)) {