mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fixed few small issues
This commit is contained in:
parent
b02b88627b
commit
991a80428d
4 changed files with 12 additions and 10 deletions
|
@ -1,13 +1,13 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "I2PEndian.h"
|
||||
#include <time.h>
|
||||
#include <boost/bind.hpp>
|
||||
#include <cryptopp/dh.h>
|
||||
#include <cryptopp/secblock.h>
|
||||
#include <cryptopp/dsa.h>
|
||||
#include "base64.h"
|
||||
#include "Log.h"
|
||||
#include "Timestamp.h"
|
||||
#include "CryptoConst.h"
|
||||
#include "I2NPProtocol.h"
|
||||
#include "RouterContext.h"
|
||||
|
@ -149,7 +149,7 @@ namespace ntcp
|
|||
memcpy (xy, m_Phase1.pubKey, 256);
|
||||
memcpy (xy + 256, y, 256);
|
||||
CryptoPP::SHA256().CalculateDigest(m_Phase2.encrypted.hxy, xy, 512);
|
||||
uint32_t tsB = htobe32 (time(0));
|
||||
uint32_t tsB = htobe32 (i2p::util::GetSecondsSinceEpoch ());
|
||||
m_Phase2.encrypted.timestamp = tsB;
|
||||
// TODO: fill filler
|
||||
|
||||
|
@ -217,7 +217,7 @@ namespace ntcp
|
|||
{
|
||||
m_Phase3.size = htons (sizeof (m_Phase3.ident));
|
||||
memcpy (&m_Phase3.ident, &i2p::context.GetRouterIdentity (), sizeof (m_Phase3.ident));
|
||||
uint32_t tsA = htobe32 (time(0));
|
||||
uint32_t tsA = htobe32 (i2p::util::GetSecondsSinceEpoch ());
|
||||
m_Phase3.timestamp = tsA;
|
||||
|
||||
SignedData s;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue