summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-12-04 01:26:31 +0100
committerSven Gothel <[email protected]>2020-12-04 01:26:31 +0100
commit73036efb8fd2533e3aab36210d052f513bb030fa (patch)
treea16aeb11818b17eedc6c7398f5a0916fd23f0cda
parent21e24b39142a3c6765291e25117f5d47287c403d (diff)
DBTDevice::hciSMPMsgCallback: SMPKeyDist initiator: Responding device overrides initiator's request: Use it.v2.1.35
-rw-r--r--src/direct_bt/DBTDevice.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/direct_bt/DBTDevice.cpp b/src/direct_bt/DBTDevice.cpp
index 01aef32b..57b80357 100644
--- a/src/direct_bt/DBTDevice.cpp
+++ b/src/direct_bt/DBTDevice.cpp
@@ -639,6 +639,7 @@ void DBTDevice::hciSMPMsgCallback(std::shared_ptr<DBTDevice> sthis, std::shared_
pairing_data.ioCap_resp = msg1.getIOCapability();
pairing_data.oobFlag_resp = msg1.getOOBDataFlag();
pairing_data.maxEncsz_resp = msg1.getMaxEncryptionKeySize();
+ pairing_data.keys_init_exp = msg1.getInitKeyDist(); // responding device overrides initiator's request!
pairing_data.keys_resp_exp = msg1.getRespKeyDist();
const bool use_sc = isSMPAuthReqBitSet( pairing_data.authReqs_init, SMPAuthReqs::SECURE_CONNECTIONS ) &&
@@ -667,6 +668,9 @@ void DBTDevice::hciSMPMsgCallback(std::shared_ptr<DBTDevice> sthis, std::shared_
jau::PLAIN_PRINT(false, "[%s] ", timestamp.c_str());
jau::PLAIN_PRINT(false, "[%s] - encsz: init %d", timestamp.c_str(), (int)pairing_data.maxEncsz_init);
jau::PLAIN_PRINT(false, "[%s] - encsz: resp %d", timestamp.c_str(), (int)pairing_data.maxEncsz_resp);
+ jau::PLAIN_PRINT(false, "[%s] ", timestamp.c_str());
+ jau::PLAIN_PRINT(false, "[%s] - keys: init %s", timestamp.c_str(), getSMPKeyDistMaskString(pairing_data.keys_init_exp).c_str());
+ jau::PLAIN_PRINT(false, "[%s] - keys: resp %s", timestamp.c_str(), getSMPKeyDistMaskString(pairing_data.keys_resp_exp).c_str());
}
}
} break;