Browse Source

publish i in correct place for NTCP2

pull/1221/head
orignal 6 years ago
parent
commit
2b64cf9126
  1. 12
      libi2pd/RouterInfo.cpp

12
libi2pd/RouterInfo.cpp

@ -538,6 +538,13 @@ namespace data @@ -538,6 +538,13 @@ namespace data
}
}
if (address.IsPublishedNTCP2 ())
{
// publish i for NTCP2
WriteString ("i", properties); properties << '=';
WriteString (address.ntcp2->iv.ToBase64 (), properties); properties << ';';
}
if (!address.IsNTCP2 () || address.IsPublishedNTCP2 ())
{
WriteString ("port", properties);
@ -552,11 +559,6 @@ namespace data @@ -552,11 +559,6 @@ namespace data
WriteString (address.ntcp2->staticKey.ToBase64 (), properties); properties << ';';
WriteString ("v", properties); properties << '=';
WriteString ("2", properties); properties << ';';
if (address.IsPublishedNTCP2 ())
{
WriteString ("i", properties); properties << '=';
WriteString (address.ntcp2->iv.ToBase64 (), properties); properties << ';';
}
}
uint16_t size = htobe16 (properties.str ().size ());

Loading…
Cancel
Save