BLE: Implement identity retrieval in secure DB.

pull/6932/head
Vincent Coubard 2018-04-17 14:15:28 +01:00
parent f905d2a4d4
commit ae8d5b4de1
1 changed files with 14 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#ifndef PAL_MEMORY_SECURITY_DB_H_
#define PAL_MEMORY_SECURITY_DB_H_
#include "ble/Gap.h"
#include "SecurityDB.h"
namespace ble {
@ -174,6 +175,19 @@ public:
cb(entry_handle, key);
}
virtual void get_entry_identity(
SecurityEntryIdentityDbCb_t cb,
entry_handle_t entry_handle
) {
entry_t *entry = as_entry(entry_handle);
if (entry && entry->flags.irk_stored) {
cb(entry_handle, &entry->peer_identity);
} else {
cb(entry_handle, NULL);
}
}
/* set */
virtual void set_entry_peer_ltk(