mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-21 16:49:10 +01:00
calculate data phase keys after verification
Some checks are pending
Build Debian packages / ${{ matrix.dist }} (bookworm) (push) Waiting to run
Build Debian packages / ${{ matrix.dist }} (bullseye) (push) Waiting to run
Build Debian packages / ${{ matrix.dist }} (buster) (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (no) (push) Waiting to run
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (no) (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (OFF) (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (ON) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (arm64, linux/arm64) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (amd64, linux/amd64) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (armv7, linux/arm/v7) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (i386, linux/386) (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
Some checks are pending
Build Debian packages / ${{ matrix.dist }} (bookworm) (push) Waiting to run
Build Debian packages / ${{ matrix.dist }} (bullseye) (push) Waiting to run
Build Debian packages / ${{ matrix.dist }} (buster) (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (no) (push) Waiting to run
Build on OSX / With USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Waiting to run
Build on Windows / ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (clang-x86_64, x64-clang, clang, CLANG64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (i686, x86, gcc, MINGW32) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (ucrt-x86_64, x64-ucrt, gcc, UCRT64) (push) Waiting to run
Build on Windows / CMake ${{ matrix.arch }} (x86_64, x64, gcc, MINGW64) (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (no) (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=${{ matrix.with_upnp }} (yes) (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (OFF) (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=${{ matrix.with_upnp }} (ON) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (arm64, linux/arm64) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (amd64, linux/amd64) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (armv7, linux/arm/v7) (push) Waiting to run
Build containers / Building container for ${{ matrix.platform }} (i386, linux/386) (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
This commit is contained in:
parent
4b1ac7420c
commit
f79a2e81ff
1 changed files with 11 additions and 10 deletions
|
@ -740,15 +740,8 @@ namespace transport
|
||||||
memset (nonce, 0, 12); // set nonce to 0 again
|
memset (nonce, 0, 12); // set nonce to 0 again
|
||||||
if (m_Establisher->ProcessSessionConfirmedMessagePart2 (nonce, buf.data ())) // TODO:handle in establisher thread
|
if (m_Establisher->ProcessSessionConfirmedMessagePart2 (nonce, buf.data ())) // TODO:handle in establisher thread
|
||||||
{
|
{
|
||||||
KeyDerivationFunctionDataPhase ();
|
|
||||||
// Bob data phase keys
|
|
||||||
m_SendKey = m_Kba;
|
|
||||||
m_ReceiveKey = m_Kab;
|
|
||||||
SetSipKeys (m_Sipkeysba, m_Sipkeysab);
|
|
||||||
memcpy (m_ReceiveIV.buf, m_Sipkeysab + 16, 8);
|
|
||||||
memcpy (m_SendIV.buf, m_Sipkeysba + 16, 8);
|
|
||||||
// payload
|
// payload
|
||||||
// process RI
|
// RI block must be first
|
||||||
if (buf[0] != eNTCP2BlkRouterInfo)
|
if (buf[0] != eNTCP2BlkRouterInfo)
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "NTCP2: Unexpected block ", (int)buf[0], " in SessionConfirmed");
|
LogPrint (eLogWarning, "NTCP2: Unexpected block ", (int)buf[0], " in SessionConfirmed");
|
||||||
|
@ -825,12 +818,20 @@ namespace transport
|
||||||
SendTerminationAndTerminate (eNTCP2Banned);
|
SendTerminationAndTerminate (eNTCP2Banned);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: process options
|
// TODO: process options block
|
||||||
|
|
||||||
// ready to communicate
|
// ready to communicate
|
||||||
SetRemoteIdentity (ri1->GetRouterIdentity ());
|
SetRemoteIdentity (ri1->GetRouterIdentity ());
|
||||||
if (m_Server.AddNTCP2Session (shared_from_this (), true))
|
if (m_Server.AddNTCP2Session (shared_from_this (), true))
|
||||||
{
|
{
|
||||||
|
KeyDerivationFunctionDataPhase ();
|
||||||
|
// Bob data phase keys
|
||||||
|
m_SendKey = m_Kba;
|
||||||
|
m_ReceiveKey = m_Kab;
|
||||||
|
SetSipKeys (m_Sipkeysba, m_Sipkeysab);
|
||||||
|
memcpy (m_ReceiveIV.buf, m_Sipkeysab + 16, 8);
|
||||||
|
memcpy (m_SendIV.buf, m_Sipkeysba + 16, 8);
|
||||||
|
|
||||||
Established ();
|
Established ();
|
||||||
ReceiveLength ();
|
ReceiveLength ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue