Diff between 075ddc4423b3d204c422d5f7ad2f926dc895bcb3 and 619acbcda394ffbb2b84d2668376e3b6a9fc631f

Changed Files

File Additions Deletions Status
src/shared/att.c +8 -0 modified
src/shared/att.h +1 -0 modified

Full Patch

diff --git a/src/shared/att.c b/src/shared/att.c
index 7671d67..422cc2c 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -1426,3 +1426,11 @@ bool bt_att_set_remote_key(struct bt_att *att, uint8_t sign_key[16],
 
 	return sign_set_key(&att->remote_sign, sign_key, func, user_data);
 }
+
+bool bt_att_has_crypto(struct bt_att *att)
+{
+	if (!att)
+		return false;
+
+	return att->crypto ? true : false;
+}
diff --git a/src/shared/att.h b/src/shared/att.h
index a440aaf..fb6247e 100644
--- a/src/shared/att.h
+++ b/src/shared/att.h
@@ -90,3 +90,4 @@ bool bt_att_set_local_key(struct bt_att *att, uint8_t sign_key[16],
 			bt_att_counter_func_t func, void *user_data);
 bool bt_att_set_remote_key(struct bt_att *att, uint8_t sign_key[16],
 			bt_att_counter_func_t func, void *user_data);
+bool bt_att_has_crypto(struct bt_att *att);