mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-09 11:27:53 +00:00
read flags from LS2 header
This commit is contained in:
parent
7cd17f8e1f
commit
812e2814bc
@ -244,14 +244,15 @@ namespace data
|
|||||||
uint32_t timestamp = bufbe32toh (buf + offset); offset += 4; // published timestamp (seconds)
|
uint32_t timestamp = bufbe32toh (buf + offset); offset += 4; // published timestamp (seconds)
|
||||||
uint16_t expires = bufbe16toh (buf + offset); offset += 2; // expires (seconds)
|
uint16_t expires = bufbe16toh (buf + offset); offset += 2; // expires (seconds)
|
||||||
SetExpirationTime ((timestamp + expires)*1000LL); // in milliseconds
|
SetExpirationTime ((timestamp + expires)*1000LL); // in milliseconds
|
||||||
offset += 2; // flags
|
uint16_t flags = bufbe16toh (buf + offset); offset += 2; // flags
|
||||||
|
if (flags) return; // offline keys not supported
|
||||||
// properties
|
// properties
|
||||||
uint16_t propertiesLen = bufbe16toh (buf + offset); offset += 2;
|
uint16_t propertiesLen = bufbe16toh (buf + offset); offset += 2;
|
||||||
offset += propertiesLen; // skip for now. TODO: implement properties
|
offset += propertiesLen; // skip for now. TODO: implement properties
|
||||||
if (offset + 1 >= len) return;
|
if (offset + 1 >= len) return;
|
||||||
// key sections
|
// key sections
|
||||||
int numKeySections = buf[offset]; offset++;
|
//int numKeySections = buf[offset]; offset++;
|
||||||
for (int i = 0; i < numKeySections; i++)
|
//for (int i = 0; i < numKeySections; i++)
|
||||||
{
|
{
|
||||||
// skip key for now. TODO: implement encryption key
|
// skip key for now. TODO: implement encryption key
|
||||||
offset += 2; // encryption key type
|
offset += 2; // encryption key type
|
||||||
|
Loading…
Reference in New Issue
Block a user