mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-06-21 21:38:20 +02:00
don't verify signature for SYN-ACK if comes from ECIESx25519 session
Some checks are pending
Build Debian packages / bookworm (push) Waiting to run
Build Debian packages / bullseye (push) Waiting to run
Build Debian packages / buster (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=no (push) Waiting to run
Build on OSX / With USE_UPNP=yes (push) Waiting to run
Build on Windows / clang-x86_64 (push) Waiting to run
Build on Windows / i686 (push) Waiting to run
Build on Windows / ucrt-x86_64 (push) Waiting to run
Build on Windows / x86_64 (push) Waiting to run
Build on Windows / CMake clang-x86_64 (push) Waiting to run
Build on Windows / CMake i686 (push) Waiting to run
Build on Windows / CMake ucrt-x86_64 (push) Waiting to run
Build on Windows / CMake x86_64 (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=no (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=yes (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Waiting to run
Build containers / Building container for linux/amd64 (push) Waiting to run
Build containers / Building container for linux/arm64 (push) Waiting to run
Build containers / Building container for linux/arm/v7 (push) Waiting to run
Build containers / Building container for linux/386 (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
Some checks are pending
Build Debian packages / bookworm (push) Waiting to run
Build Debian packages / bullseye (push) Waiting to run
Build Debian packages / buster (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=no (push) Waiting to run
Build on OSX / With USE_UPNP=yes (push) Waiting to run
Build on Windows / clang-x86_64 (push) Waiting to run
Build on Windows / i686 (push) Waiting to run
Build on Windows / ucrt-x86_64 (push) Waiting to run
Build on Windows / x86_64 (push) Waiting to run
Build on Windows / CMake clang-x86_64 (push) Waiting to run
Build on Windows / CMake i686 (push) Waiting to run
Build on Windows / CMake ucrt-x86_64 (push) Waiting to run
Build on Windows / CMake x86_64 (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=no (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=yes (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Waiting to run
Build containers / Building container for linux/amd64 (push) Waiting to run
Build containers / Building container for linux/arm64 (push) Waiting to run
Build containers / Building container for linux/arm/v7 (push) Waiting to run
Build containers / Building container for linux/386 (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
This commit is contained in:
parent
78357c23d2
commit
a6bf6baf1b
1 changed files with 13 additions and 18 deletions
|
@ -412,26 +412,21 @@ namespace stream
|
|||
if (!m_RemoteLeaseSet)
|
||||
{
|
||||
LogPrint (eLogDebug, "Streaming: Incoming stream from ", m_RemoteIdentity->GetIdentHash ().ToBase32 (), ", sSID=", m_SendStreamID, ", rSID=", m_RecvStreamID);
|
||||
if (packet->from)
|
||||
{
|
||||
// stream came from ratchets session and static key must match one from LeaseSet
|
||||
if (packet->from) // try to obtain LeaseSet if came from ratchets session
|
||||
m_RemoteLeaseSet = m_LocalDestination.GetOwner ()->FindLeaseSet (m_RemoteIdentity->GetIdentHash ());
|
||||
if (!m_RemoteLeaseSet)
|
||||
{
|
||||
LogPrint (eLogInfo, "Streaming: Incoming stream from ", m_RemoteIdentity->GetIdentHash ().ToBase32 (),
|
||||
" without LeaseSet. sSID=", m_SendStreamID, ", rSID=", m_RecvStreamID);
|
||||
return false;
|
||||
}
|
||||
uint8_t staticKey[32];
|
||||
m_RemoteLeaseSet->Encrypt (nullptr, staticKey);
|
||||
if (memcmp (packet->from->GetRemoteStaticKey (), staticKey, 32))
|
||||
{
|
||||
LogPrint (eLogError, "Streaming: Remote LeaseSet static key mismatch for incoming stream from ",
|
||||
m_RemoteIdentity->GetIdentHash ().ToBase32 ());
|
||||
return false;
|
||||
}
|
||||
sessionVerified = true;
|
||||
}
|
||||
if (packet->from && m_RemoteLeaseSet)
|
||||
{
|
||||
// stream came from ratchets session and static key must match one from LeaseSet
|
||||
uint8_t staticKey[32];
|
||||
m_RemoteLeaseSet->Encrypt (nullptr, staticKey);
|
||||
if (memcmp (packet->from->GetRemoteStaticKey (), staticKey, 32))
|
||||
{
|
||||
LogPrint (eLogError, "Streaming: Remote LeaseSet static key mismatch for stream from ",
|
||||
m_RemoteIdentity->GetIdentHash ().ToBase32 ());
|
||||
return false;
|
||||
}
|
||||
sessionVerified = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue