Commit 95280b19 authored by Adrien Béraud's avatar Adrien Béraud Committed by Sébastien Blin

JamiAccount: use full public key or sha256 for DeviceId instead of sha1

Change-Id: I5e135b9ef4365acf87e6de4a8b1af9d19ef34ca3
parent 98df43e9
......@@ -3,7 +3,7 @@ MSGPACK_VERSION := cpp-3.2.0
MSGPACK_URL := https://github.com/msgpack/msgpack-c/archive/$(MSGPACK_VERSION).tar.gz
PKGS += msgpack
ifeq ($(call need_pkg,"msgpack >= 1.1"),)
ifeq ($(call need_pkg,"msgpack >= 3.0.0"),)
PKGS_FOUND += msgpack
endif
......
75d3da56bb9cb4ccc3afcb29b68a19f551f7a0f10193bf9a6efb2acaed2b4243c39daf96d8ab4e080596d44e15da1198a91cfaa7cd457ccdbb3d10a08f9b5fb0 opendht-2.2.0.tar.gz
\ No newline at end of file
11cb53c1145793fb92d54a7775a00783bb8216939d87c31c9b12433a274b4f728cfa46de64bd111d14817264bee2bab12511549c8a544f863ddfdbbe2261c140 opendht-efda4af94c6310b3966dc850f20467b6309d0a43.tar.gz
{
"name": "opendht",
"version": "2.2.0",
"version": "efda4af94c6310b3966dc850f20467b6309d0a43",
"url": "https://github.com/savoirfairelinux/opendht/archive/__VERSION__.tar.gz",
"deps": [
"argon2",
......
# OPENDHT
OPENDHT_VERSION := 2.2.0
OPENDHT_VERSION := efda4af94c6310b3966dc850f20467b6309d0a43
OPENDHT_URL := https://github.com/savoirfairelinux/opendht/archive/$(OPENDHT_VERSION).tar.gz
PKGS += opendht
......
......@@ -177,7 +177,8 @@ AccountManager::useIdentity(const dht::crypto::Identity& identity,
info->contacts = std::move(contactList);
info->contacts->load();
info->accountId = id;
info->deviceId = identity.first->getPublicKey().getId().toString();
info->devicePk = identity.first->getSharedPublicKey();
info->deviceId = info->devicePk->getLongId().toString();
info->announce = std::move(announce);
info->ethAccount = root["eth"].asString();
info->username = username;
......@@ -212,6 +213,7 @@ AccountManager::startSync(const OnNewDeviceCb& cb, const OnDeviceAnnouncedCb& dc
for (const auto& crl : info_->identity.second->issuer->getRevocationLists())
dht_->put(h, crl, dht::DoneCallback {}, {}, true);
dht_->listen<DeviceAnnouncement>(h, [this, cb = std::move(cb)](DeviceAnnouncement&& dev) {
// dev.from
findCertificate(dev.dev,
[this, cb](const std::shared_ptr<dht::crypto::Certificate>& crt) {
foundAccountDevice(crt);
......@@ -235,13 +237,13 @@ AccountManager::startSync(const OnNewDeviceCb& cb, const OnDeviceAnnouncedCb& dc
JAMI_WARN("can't announce device: no announcement...");
}
auto inboxKey = dht::InfoHash::get("inbox:" + info_->deviceId);
auto inboxKey = dht::InfoHash::get("inbox:" + info_->devicePk->getId().toString());
dht_->listen<dht::TrustRequest>(inboxKey, [this](dht::TrustRequest&& v) {
if (v.service != DHT_TYPE_NS)
return true;
// allowPublic always true for trust requests (only forbidden if banned)
onPeerMessage(v.from,
onPeerMessage(*v.owner,
true,
[this, v](const std::shared_ptr<dht::crypto::Certificate>&,
dht::InfoHash peer_account) mutable {
......@@ -251,7 +253,7 @@ AccountManager::startSync(const OnNewDeviceCb& cb, const OnDeviceAnnouncedCb& dc
v.conversationId.c_str());
if (info_)
if (info_->contacts->onTrustRequest(peer_account,
v.from,
v.owner,
time(nullptr),
v.confirm,
v.conversationId,
......@@ -264,7 +266,7 @@ AccountManager::startSync(const OnNewDeviceCb& cb, const OnDeviceAnnouncedCb& dc
});
}
const std::map<dht::InfoHash, KnownDevice>&
const std::map<dht::PkId, KnownDevice>&
AccountManager::getKnownDevices() const
{
return info_->contacts->getKnownDevices();
......@@ -282,14 +284,14 @@ void
AccountManager::setAccountDeviceName(const std::string& name)
{
if (info_)
info_->contacts->setAccountDeviceName(dht::InfoHash(info_->deviceId), name);
info_->contacts->setAccountDeviceName(DeviceId(info_->deviceId), name);
}
std::string
AccountManager::getAccountDeviceName() const
{
if (info_)
return info_->contacts->getAccountDeviceName(dht::InfoHash(info_->deviceId));
return info_->contacts->getAccountDeviceName(DeviceId(info_->deviceId));
return {};
}
......@@ -334,7 +336,7 @@ AccountManager::foundPeerDevice(const std::shared_ptr<dht::crypto::Certificate>&
}
void
AccountManager::onPeerMessage(const dht::InfoHash& peer_device,
AccountManager::onPeerMessage(const dht::crypto::PublicKey& peer_device,
bool allowPublic,
std::function<void(const std::shared_ptr<dht::crypto::Certificate>& crt,
const dht::InfoHash& peer_account)>&& cb)
......@@ -346,8 +348,8 @@ AccountManager::onPeerMessage(const dht::InfoHash& peer_device,
return;
}
findCertificate(peer_device,
[this, peer_device, cb = std::move(cb), allowPublic](
findCertificate(peer_device.getId(),
[this, cb = std::move(cb), allowPublic](
const std::shared_ptr<dht::crypto::Certificate>& cert) {
dht::InfoHash peer_account_id;
if (onPeerCertificate(cert, allowPublic, peer_account_id)) {
......@@ -576,6 +578,26 @@ AccountManager::findCertificate(
return true;
}
bool
AccountManager::findCertificate(
const dht::PkId& id, std::function<void(const std::shared_ptr<dht::crypto::Certificate>&)>&& cb)
{
if (auto cert = tls::CertificateStore::instance().getCertificate(id.toString())) {
if (cb)
cb(cert);
} else {
/*dht_->findCertificate(id, [cb](const std::shared_ptr<dht::crypto::Certificate>& crt) {
if (crt)
tls::CertificateStore::instance().pinCertificate(crt);
if (cb)
cb(crt);
});*/
if (cb)
cb(nullptr);
}
return true;
}
bool
AccountManager::setCertificateStatus(const std::string& cert_id,
tls::TrustStore::PermissionStatus status)
......@@ -656,14 +678,15 @@ AccountManager::sendTrustRequest(const std::string& to,
if (info_->contacts->addContact(toH, false, convId)) {
syncDevices();
}
forEachDevice(toH, [this, toH, convId, payload](const dht::InfoHash& dev) {
JAMI_WARN("sending trust request to: %s / %s",
toH.toString().c_str(),
dev.toString().c_str());
dht_->putEncrypted(dht::InfoHash::get("inbox:" + dev.toString()),
dev,
dht::TrustRequest(DHT_TYPE_NS, convId, payload));
});
forEachDevice(toH,
[this, toH, convId, payload](const std::shared_ptr<dht::crypto::PublicKey>& dev) {
JAMI_WARN("sending trust request to: %s / %s",
toH.toString().c_str(),
dev->getLongId().toString().c_str());
dht_->putEncrypted(dht::InfoHash::get("inbox:" + dev->getId().toString()),
dev,
dht::TrustRequest(DHT_TYPE_NS, convId, payload));
});
}
void
......@@ -677,18 +700,21 @@ AccountManager::sendTrustRequestConfirm(const dht::InfoHash& toH, const std::str
if (!convId.empty() && info_)
info_->contacts->acceptConversation(convId);
forEachDevice(toH, [this, toH, answer](const dht::InfoHash& dev) {
forEachDevice(toH, [this, toH, answer](const std::shared_ptr<dht::crypto::PublicKey>& dev) {
JAMI_WARN("sending trust request reply: %s / %s",
toH.toString().c_str(),
dev.toString().c_str());
dht_->putEncrypted(dht::InfoHash::get("inbox:" + dev.toString()), dev, answer);
dev->getLongId().toString().c_str());
dht_->putEncrypted(dht::InfoHash::get("inbox:" + info_->devicePk->getId().toString()),
dev,
answer);
});
}
void
AccountManager::forEachDevice(const dht::InfoHash& to,
std::function<void(const dht::InfoHash&)>&& op,
std::function<void(bool)>&& end)
AccountManager::forEachDevice(
const dht::InfoHash& to,
std::function<void(const std::shared_ptr<dht::crypto::PublicKey>&)>&& op,
std::function<void(bool)>&& end)
{
if (not dht_) {
JAMI_ERR("forEachDevice: no dht");
......@@ -696,26 +722,63 @@ AccountManager::forEachDevice(const dht::InfoHash& to,
end(false);
return;
}
auto treatedDevices = std::make_shared<std::set<dht::InfoHash>>();
dht_->get<dht::crypto::RevocationList>(to, [to](dht::crypto::RevocationList&& crl) {
tls::CertificateStore::instance().pinRevocationList(to.toString(), std::move(crl));
return true;
});
struct State
{
unsigned remaining {0};
std::set<dht::PkId> treatedDevices {};
std::function<void(const std::shared_ptr<dht::crypto::PublicKey>&)> onDevice;
std::function<void(bool)> onEnd;
void found(std::shared_ptr<dht::crypto::PublicKey> pk)
{
remaining--;
if (pk && *pk) {
auto longId = pk->getLongId();
if (treatedDevices.emplace(longId).second) {
onDevice(pk);
}
}
ended();
}
void ended()
{
if (remaining == 0 && onEnd) {
JAMI_DBG("Found %lu devices", treatedDevices.size());
onEnd(not treatedDevices.empty());
onDevice = {};
onEnd = {};
}
}
};
auto state = std::make_shared<State>();
state->onDevice = std::move(op);
state->onEnd = std::move(end);
dht_->get<DeviceAnnouncement>(
to,
[to, treatedDevices, op = std::move(op)](DeviceAnnouncement&& dev) {
[this, to, state](DeviceAnnouncement&& dev) {
if (dev.from != to)
return true;
if (treatedDevices->emplace(dev.dev).second) {
op(dev.dev);
if (dev.pk) {
state->found(std::move(dev.pk));
} else {
state->remaining++;
findCertificate(dev.dev,
[state](const std::shared_ptr<dht::crypto::Certificate>& cert) {
state->found(cert ? std::make_shared<dht::crypto::PublicKey>(
cert->getPublicKey())
: std::shared_ptr<dht::crypto::PublicKey> {});
});
}
return true;
},
[=, end = std::move(end)](bool /*ok*/) {
JAMI_DBG("Found %lu devices for %s", treatedDevices->size(), to.to_c_str());
if (end)
end(not treatedDevices->empty());
});
[state](bool /*ok*/) { state->ended(); });
}
void
......
......@@ -40,6 +40,7 @@ class DhtRunner;
namespace jami {
using DeviceId = dht::PkId;
struct AccountArchive;
struct AccountInfo
......@@ -50,6 +51,7 @@ struct AccountInfo
std::map<std::string, ConversationRequest> conversationsRequests;
std::string accountId;
std::string deviceId;
std::shared_ptr<dht::crypto::PublicKey> devicePk;
std::shared_ptr<dht::Value> announce;
std::string ethAccount;
std::string username;
......@@ -166,7 +168,7 @@ public:
return false;
};
const std::map<dht::InfoHash, KnownDevice>& getKnownDevices() const;
const std::map<dht::PkId, KnownDevice>& getKnownDevices() const;
bool foundAccountDevice(const std::shared_ptr<dht::crypto::Certificate>& crt,
const std::string& name = {},
const time_point& last_sync = time_point::min());
......@@ -175,12 +177,12 @@ public:
std::string getAccountDeviceName() const;
void forEachDevice(const dht::InfoHash& to,
std::function<void(const dht::InfoHash&)>&& op,
std::function<void(const std::shared_ptr<dht::crypto::PublicKey>&)>&& op,
std::function<void(bool)>&& end = {});
using PeerCertificateCb = std::function<void(const std::shared_ptr<dht::crypto::Certificate>& crt,
const dht::InfoHash& peer_account)>;
void onPeerMessage(const dht::InfoHash& peer_device, bool allowPublic, PeerCertificateCb&& cb);
void onPeerMessage(const dht::crypto::PublicKey& peer_device, bool allowPublic, PeerCertificateCb&& cb);
bool onPeerCertificate(const std::shared_ptr<dht::crypto::Certificate>& crt,
bool allowPublic,
dht::InfoHash& account_id);
......@@ -237,6 +239,11 @@ public:
virtual bool findCertificate(
const dht::InfoHash& h,
std::function<void(const std::shared_ptr<dht::crypto::Certificate>&)>&& cb = {});
virtual bool findCertificate(
const dht::PkId& h,
std::function<void(const std::shared_ptr<dht::crypto::Certificate>&)>&& cb = {});
bool setCertificateStatus(const std::string& cert_id, tls::TrustStore::PermissionStatus status);
std::vector<std::string> getCertificatesByStatus(tls::TrustStore::PermissionStatus status);
tls::TrustStore::PermissionStatus getCertificateStatus(const std::string& cert_id) const;
......
......@@ -341,7 +341,8 @@ ArchiveAccountManager::onArchiveLoaded(AuthContext& ctx, AccountArchive&& a)
info->identity.first = ctx.key.get();
info->identity.second = deviceCertificate;
info->accountId = a.id.second->getId().toString();
info->deviceId = deviceCertificate->getPublicKey().getId().toString();
info->devicePk = info->identity.first->getSharedPublicKey();
info->deviceId = info->devicePk->getLongId().toString();
if (ctx.deviceName.empty())
ctx.deviceName = info->deviceId.substr(8);
......@@ -399,12 +400,16 @@ ArchiveAccountManager::makeReceipt(const dht::crypto::Identity& id,
auto devId = device.getId();
DeviceAnnouncement announcement;
announcement.dev = devId;
announcement.pk = std::make_shared<dht::crypto::PublicKey>(device.getPublicKey());
dht::Value ann_val {announcement};
ann_val.sign(*id.first);
auto packedAnnoucement = ann_val.getPacked();
JAMI_DBG("[Auth] device announcement size: %zu", packedAnnoucement.size());
std::ostringstream is;
is << "{\"id\":\"" << id.second->getId() << "\",\"dev\":\"" << devId << "\",\"eth\":\""
<< ethAccount << "\",\"announce\":\"" << base64::encode(ann_val.getPacked()) << "\"}";
<< ethAccount << "\",\"announce\":\"" << base64::encode(packedAnnoucement) << "\"}";
// auto announce_ = ;
return {is.str(), std::make_shared<dht::Value>(std::move(ann_val))};
......@@ -444,11 +449,12 @@ ArchiveAccountManager::syncDevices()
// don't send sync data to ourself
if (dev.first.toString() == info_->deviceId)
continue;
auto pk = std::make_shared<dht::crypto::PublicKey>(dev.second.certificate->getPublicKey());
JAMI_DBG("sending device sync to %s %s",
dev.second.name.c_str(),
dev.first.toString().c_str());
auto syncDeviceKey = dht::InfoHash::get("inbox:" + dev.first.toString());
dht_->putEncrypted(syncDeviceKey, dev.first, sync_data);
auto syncDeviceKey = dht::InfoHash::get("inbox:" + pk->getId().toString());
dht_->putEncrypted(syncDeviceKey, pk, sync_data);
}
}
......@@ -457,23 +463,26 @@ ArchiveAccountManager::startSync(const OnNewDeviceCb& cb, const OnDeviceAnnounce
{
AccountManager::startSync(std::move(cb), std::move(dcb));
dht_->listen<DeviceSync>(dht::InfoHash::get("inbox:" + info_->deviceId), [this](DeviceSync&& sync) {
// Received device sync data.
// check device certificate
findCertificate(sync.from,
[this, sync](const std::shared_ptr<dht::crypto::Certificate>& cert) mutable {
if (!cert or cert->getId() != sync.from) {
JAMI_WARN("Can't find certificate for device %s",
sync.from.toString().c_str());
return;
}
if (not foundAccountDevice(cert))
return;
onSyncData(std::move(sync));
});
dht_->listen<DeviceSync>(
dht::InfoHash::get("inbox:" + info_->devicePk->getId().toString()),
[this](DeviceSync&& sync) {
// Received device sync data.
// check device certificate
findCertificate(sync.from,
[this,
sync](const std::shared_ptr<dht::crypto::Certificate>& cert) mutable {
if (!cert or cert->getId() != sync.from) {
JAMI_WARN("Can't find certificate for device %s",
sync.from.toString().c_str());
return;
}
if (not foundAccountDevice(cert))
return;
onSyncData(std::move(sync));
});
return true;
});
return true;
});
}
void
......@@ -482,14 +491,14 @@ ArchiveAccountManager::onSyncData(DeviceSync&& sync, bool checkDevice)
auto sync_date = clock::time_point(clock::duration(sync.date));
if (checkDevice) {
// If the DHT is used, we need to check the device here
if (not info_->contacts->syncDevice(sync.from, sync_date)) {
if (not info_->contacts->syncDevice(sync.owner->getLongId(), sync_date)) {
return;
}
}
// Sync known devices
JAMI_DBG("[Contacts] received device sync data (%lu devices, %lu contacts)",
sync.devices_known.size(),
sync.devices_known.size() + sync.devices.size(),
sync.peers.size());
for (const auto& d : sync.devices_known) {
findCertificate(d.first, [this, d](const std::shared_ptr<dht::crypto::Certificate>& crt) {
......@@ -499,6 +508,15 @@ ArchiveAccountManager::onSyncData(DeviceSync&& sync, bool checkDevice)
foundAccountDevice(crt, d.second);
});
}
for (const auto& d : sync.devices) {
findCertificate(d.second.sha1,
[this, d](const std::shared_ptr<dht::crypto::Certificate>& crt) {
if (not crt || crt->getLongId() != d.first)
return;
// std::lock_guard<std::mutex> lock(deviceListMutex_);
foundAccountDevice(crt, d.second.name);
});
}
// saveKnownDevices();
// Sync contacts
......@@ -702,7 +720,7 @@ ArchiveAccountManager::revokeDevice(const std::string& password,
tls::CertificateStore::instance().loadRevocations(*a.id.second);
this_.saveArchive(a, password);
this_.info_->contacts->removeAccountDevice(crt->getId());
this_.info_->contacts->removeAccountDevice(crt->getLongId());
cb(RevokeDeviceResult::SUCCESS);
this_.syncDevices();
});
......
......@@ -109,7 +109,7 @@ public:
dht::Value::Id vid;
};
void connectDeviceStartIce(const DeviceId& deviceId, const dht::Value::Id& vid);
void connectDeviceStartIce(const std::shared_ptr<dht::crypto::PublicKey>& devicePk, const dht::Value::Id& vid);
void connectDeviceOnNegoDone(const DeviceId& deviceId,
const std::string& name,
const dht::Value::Id& vid,
......@@ -136,7 +136,7 @@ public:
/**
* Triggered when a PeerConnectionRequest comes from the DHT
*/
void answerTo(IceTransport& ice, const dht::Value::Id& id, const DeviceId& from);
void answerTo(IceTransport& ice, const dht::Value::Id& id, const std::shared_ptr<dht::crypto::PublicKey>& fromPk);
void onRequestStartIce(const PeerConnectionRequest& req);
void onRequestOnNegoDone(const PeerConnectionRequest& req);
void onDhtPeerRequest(const PeerConnectionRequest& req,
......@@ -144,7 +144,7 @@ public:
void addNewMultiplexedSocket(const DeviceId& deviceId, const dht::Value::Id& vid);
void onPeerResponse(const PeerConnectionRequest& req);
void onDhtConnected(const DeviceId& deviceId);
void onDhtConnected(const dht::crypto::PublicKey& devicePk);
/**
* Triggered when a new TLS socket is ready to use
......@@ -262,8 +262,9 @@ public:
};
void
ConnectionManager::Impl::connectDeviceStartIce(const DeviceId& deviceId, const dht::Value::Id& vid)
ConnectionManager::Impl::connectDeviceStartIce(const std::shared_ptr<dht::crypto::PublicKey>& devicePk, const dht::Value::Id& vid)
{
auto deviceId = devicePk->getLongId();
auto info = getInfo(deviceId, vid);
if (!info) {
return;
......@@ -305,8 +306,8 @@ ConnectionManager::Impl::connectDeviceStartIce(const DeviceId& deviceId, const d
// Send connection request through DHT
JAMI_DBG() << account << "Request connection to " << deviceId;
account.dht()->putEncrypted(dht::InfoHash::get(PeerConnectionRequest::key_prefix
+ deviceId.toString()),
deviceId,
+ devicePk->getId().toString()),
devicePk,
value,
[deviceId](bool ok) {
if (!ok)
......@@ -396,7 +397,7 @@ ConnectionManager::Impl::connectDevice(const DeviceId& deviceId,
[w = weak(), deviceId, name, cb = std::move(cb), noNewSocket](
const std::shared_ptr<dht::crypto::Certificate>& cert) {
if (!cert) {
JAMI_ERR("Invalid certificate found for device %s",
JAMI_ERR("No valid certificate found for device %s",
deviceId.to_c_str());
cb(nullptr, deviceId);
return;
......@@ -419,7 +420,8 @@ ConnectionManager::Impl::connectDevice(const std::shared_ptr<dht::crypto::Certif
cert = std::move(cert),
cb = std::move(cb),
noNewSocket] {
auto deviceId = cert->getId();
auto devicePk = std::make_shared<dht::crypto::PublicKey>(cert->getPublicKey());
auto deviceId = devicePk->getLongId();
auto sthis = w.lock();
if (!sthis || sthis->isDestroying_) {
cb(nullptr, deviceId);
......@@ -488,6 +490,7 @@ ConnectionManager::Impl::connectDevice(const std::shared_ptr<dht::crypto::Certif
// If no socket exists, we need to initiate an ICE connection.
sthis->account.getIceOptions([w,
deviceId = std::move(deviceId),
devicePk = std::move(devicePk),
name = std::move(name),
cert = std::move(cert),
vid,
......@@ -498,6 +501,7 @@ ConnectionManager::Impl::connectDevice(const std::shared_ptr<dht::crypto::Certif
ice_config.tcpEnable = true;
ice_config.onInitDone = [w,
deviceId = std::move(deviceId),
devicePk = std::move(devicePk),
name = std::move(name),
cert = std::move(cert),
vid,
......@@ -514,9 +518,9 @@ ConnectionManager::Impl::connectDevice(const std::shared_ptr<dht::crypto::Certif
}
dht::ThreadPool::io().run(
[w = std::move(w), deviceId = std::move(deviceId), vid = std::move(vid)] {
[w = std::move(w), devicePk = std::move(devicePk), vid = std::move(vid)] {
if (auto sthis = w.lock())
sthis->connectDeviceStartIce(deviceId, vid);
sthis->connectDeviceStartIce(devicePk, vid);
});
};
ice_config.onNegoDone = [w,
......@@ -607,7 +611,7 @@ ConnectionManager::Impl::sendChannelRequest(std::shared_ptr<MultiplexedSocket>&
void
ConnectionManager::Impl::onPeerResponse(const PeerConnectionRequest& req)
{
auto device = req.from;
auto device = req.owner->getLongId();
JAMI_INFO() << account << " New response received from " << device.to_c_str();
if (auto info = getInfo(device, req.id)) {
std::lock_guard<std::mutex> lk {info->mutex_};
......@@ -620,12 +624,12 @@ ConnectionManager::Impl::onPeerResponse(const PeerConnectionRequest& req)
}
void
ConnectionManager::Impl::onDhtConnected(const DeviceId& deviceId)
ConnectionManager::Impl::onDhtConnected(const dht::crypto::PublicKey& devicePk)
{
if (!account.dht())
return;
account.dht()->listen<PeerConnectionRequest>(
dht::InfoHash::get(PeerConnectionRequest::key_prefix + deviceId.toString()),
dht::InfoHash::get(PeerConnectionRequest::key_prefix + devicePk.getId().toString()),
[w = weak()](PeerConnectionRequest&& req) {
auto shared = w.lock();
if (!shared)
......@@ -635,9 +639,9 @@ ConnectionManager::Impl::onDhtConnected(const DeviceId& deviceId)
return true;
}
if (req.isAnswer) {
JAMI_DBG() << "Received request answer from " << req.from;
JAMI_DBG() << "Received request answer from " << req.owner->getLongId();
} else {
JAMI_DBG() << "Received request from " << req.from;
JAMI_DBG() << "Received request from " << req.owner->getLongId();
}
// Hack:
// Note: This reschedule on the io pool should not be necessary
......@@ -666,7 +670,7 @@ ConnectionManager::Impl::onDhtConnected(const DeviceId& deviceId)
} else {
JAMI_WARN()
<< shared->account
<< "Rejected untrusted connection request from " << req.from;
<< "Rejected untrusted connection request from " << req.owner->getLongId();
}
});
}
......@@ -728,7 +732,7 @@ ConnectionManager::Impl::onTlsNegotiationDone(bool ok,
}
void
ConnectionManager::Impl::answerTo(IceTransport& ice, const dht::Value::Id& id, const DeviceId& from)
ConnectionManager::Impl::answerTo(IceTransport& ice, const dht::Value::Id& id, const std::shared_ptr<dht::crypto::PublicKey>& from)
{