Commit f1bd5c99 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

fix: file transfer on macOS

prevent bad access when verifying certificate.

Change-Id: Ic54749f58894b4832f3331a21ca714dfa986f50e
parent b49029a6
......@@ -858,15 +858,16 @@ DhtPeerConnector::Impl::answerToRequest(PeerConnectionMsg&& request,
std::unique_ptr<AbstractSocketEndpoint> peer_ep =
std::make_unique<IceSocketEndpoint>(ice, false);
JAMI_DBG() << account << "[CNX] start TLS session";
auto ph = peer_h;
if (hasPubIp) ice->setSlaveSession();
auto idx = std::make_pair(peer_h, ice->getRemoteAddress(0));
auto it = waitForReadyEndpoints_.emplace(
std::make_unique<TlsSocketEndpoint>(*peer_ep, account.identity(), account.dhParams(),
[&, this](const dht::crypto::Certificate &cert) {
return validatePeerCertificate(cert, ph);
[peer_h, this](const dht::crypto::Certificate &cert) {
dht::InfoHash peer_h_found;
return validatePeerCertificate(cert, peer_h_found)
and peer_h_found == peer_h;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment