mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 04:07:49 +02:00
Merge branch 'PurpleI2P:openssl' into ui
This commit is contained in:
commit
b7f2dd9074
6 changed files with 58 additions and 38 deletions
|
@ -1,7 +1,7 @@
|
|||
%define git_hash %(git rev-parse HEAD | cut -c -7)
|
||||
|
||||
Name: i2pd-git
|
||||
Version: 2.38.0
|
||||
Version: 2.39.0
|
||||
Release: git%{git_hash}%{?dist}
|
||||
Summary: I2P router written in C++
|
||||
Conflicts: i2pd
|
||||
|
@ -57,7 +57,7 @@ cd build
|
|||
%endif
|
||||
|
||||
|
||||
%if 0%{?fedora} >= 36
|
||||
%if 0%{?fedora} >= 35
|
||||
pushd redhat-linux-build
|
||||
%else
|
||||
%if 0%{?fedora} >= 33
|
||||
|
@ -82,7 +82,7 @@ popd
|
|||
%install
|
||||
pushd build
|
||||
|
||||
%if 0%{?fedora} >= 36
|
||||
%if 0%{?fedora} >= 35
|
||||
pushd redhat-linux-build
|
||||
%else
|
||||
%if 0%{?fedora} >= 33
|
||||
|
@ -146,6 +146,13 @@ getent passwd i2pd >/dev/null || \
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Aug 24 2021 r4sas <r4sas@i2pmail.org> - 2.39.0-2
|
||||
- changed if statements to cover fedora 35
|
||||
|
||||
* Mon Aug 23 2021 orignal <i2porignal@yandex.ru> - 2.39.0
|
||||
- update to 2.39.0
|
||||
- fixed build on fedora 36
|
||||
|
||||
* Mon May 17 2021 orignal <i2porignal@yandex.ru> - 2.38.0
|
||||
- update to 2.38.0
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Name: i2pd
|
||||
Version: 2.38.0
|
||||
Release: 1%{?dist}
|
||||
Version: 2.39.0
|
||||
Release: 2%{?dist}
|
||||
Summary: I2P router written in C++
|
||||
Conflicts: i2pd-git
|
||||
|
||||
|
@ -54,7 +54,7 @@ cd build
|
|||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 36
|
||||
%if 0%{?fedora} >= 35
|
||||
pushd redhat-linux-build
|
||||
%else
|
||||
%if 0%{?fedora} >= 33
|
||||
|
@ -79,7 +79,7 @@ popd
|
|||
%install
|
||||
pushd build
|
||||
|
||||
%if 0%{?fedora} >= 36
|
||||
%if 0%{?fedora} >= 35
|
||||
pushd redhat-linux-build
|
||||
%else
|
||||
%if 0%{?fedora} >= 33
|
||||
|
@ -143,6 +143,13 @@ getent passwd i2pd >/dev/null || \
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Aug 24 2021 r4sas <r4sas@i2pmail.org> - 2.39.0-2
|
||||
- changed if statements to cover fedora 35
|
||||
|
||||
* Mon Aug 23 2021 orignal <i2porignal@yandex.ru> - 2.39.0
|
||||
- update to 2.39.0
|
||||
- fixed build on fedora 36
|
||||
|
||||
* Mon May 17 2021 orignal <i2porignal@yandex.ru> - 2.38.0
|
||||
- update to 2.38.0
|
||||
|
||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
i2pd (2.39.0-1) unstable; urgency=medium
|
||||
|
||||
* updated to version 2.39.0/0.9.51
|
||||
|
||||
-- orignal <orignal@i2pmail.org> Mon, 23 Aug 2021 16:00:00 +0000
|
||||
|
||||
i2pd (2.38.0-1) unstable; urgency=medium
|
||||
|
||||
* updated to version 2.38.0/0.9.50
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2021, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
@ -31,14 +31,14 @@ namespace tunnel
|
|||
|
||||
TunnelHopConfig * next, * prev;
|
||||
int recordIndex; // record # in tunnel build message
|
||||
|
||||
|
||||
TunnelHopConfig (std::shared_ptr<const i2p::data::IdentityEx> r);
|
||||
virtual ~TunnelHopConfig () {};
|
||||
|
||||
|
||||
void SetNextIdent (const i2p::data::IdentHash& ident);
|
||||
void SetReplyHop (uint32_t replyTunnelID, const i2p::data::IdentHash& replyIdent);
|
||||
void SetNext (TunnelHopConfig * n);
|
||||
void SetPrev (TunnelHopConfig * p);
|
||||
void SetPrev (TunnelHopConfig * p);
|
||||
|
||||
virtual uint8_t GetRetCode (const uint8_t * records) const = 0;
|
||||
virtual void CreateBuildRequestRecord (uint8_t * records, uint32_t replyMsgID) = 0;
|
||||
|
@ -51,47 +51,47 @@ namespace tunnel
|
|||
{
|
||||
ElGamalTunnelHopConfig (std::shared_ptr<const i2p::data::IdentityEx> r):
|
||||
TunnelHopConfig (r) {};
|
||||
uint8_t GetRetCode (const uint8_t * records) const
|
||||
{ return (records + recordIndex*TUNNEL_BUILD_RECORD_SIZE)[BUILD_RESPONSE_RECORD_RET_OFFSET]; };
|
||||
void CreateBuildRequestRecord (uint8_t * records, uint32_t replyMsgID);
|
||||
bool DecryptBuildResponseRecord (uint8_t * records) const;
|
||||
};
|
||||
uint8_t GetRetCode (const uint8_t * records) const
|
||||
{ return (records + recordIndex*TUNNEL_BUILD_RECORD_SIZE)[BUILD_RESPONSE_RECORD_RET_OFFSET]; };
|
||||
void CreateBuildRequestRecord (uint8_t * records, uint32_t replyMsgID);
|
||||
bool DecryptBuildResponseRecord (uint8_t * records) const;
|
||||
};
|
||||
|
||||
struct ECIESTunnelHopConfig: public TunnelHopConfig, public i2p::crypto::NoiseSymmetricState
|
||||
{
|
||||
ECIESTunnelHopConfig (std::shared_ptr<const i2p::data::IdentityEx> r):
|
||||
TunnelHopConfig (r) {};
|
||||
void EncryptECIES (const uint8_t * clearText, size_t len, uint8_t * encrypted);
|
||||
void EncryptECIES (const uint8_t * clearText, size_t len, uint8_t * encrypted);
|
||||
bool DecryptECIES (const uint8_t * key, const uint8_t * nonce, const uint8_t * encrypted, size_t len, uint8_t * clearText) const;
|
||||
};
|
||||
|
||||
|
||||
struct LongECIESTunnelHopConfig: public ECIESTunnelHopConfig
|
||||
{
|
||||
LongECIESTunnelHopConfig (std::shared_ptr<const i2p::data::IdentityEx> r):
|
||||
ECIESTunnelHopConfig (r) {};
|
||||
uint8_t GetRetCode (const uint8_t * records) const
|
||||
{ return (records + recordIndex*TUNNEL_BUILD_RECORD_SIZE)[ECIES_BUILD_RESPONSE_RECORD_RET_OFFSET]; };
|
||||
void CreateBuildRequestRecord (uint8_t * records, uint32_t replyMsgID);
|
||||
bool DecryptBuildResponseRecord (uint8_t * records) const;
|
||||
};
|
||||
uint8_t GetRetCode (const uint8_t * records) const override
|
||||
{ return (records + recordIndex*TUNNEL_BUILD_RECORD_SIZE)[ECIES_BUILD_RESPONSE_RECORD_RET_OFFSET]; };
|
||||
void CreateBuildRequestRecord (uint8_t * records, uint32_t replyMsgID) override;
|
||||
bool DecryptBuildResponseRecord (uint8_t * records) const override;
|
||||
};
|
||||
|
||||
struct ShortECIESTunnelHopConfig: public ECIESTunnelHopConfig
|
||||
{
|
||||
ShortECIESTunnelHopConfig (std::shared_ptr<const i2p::data::IdentityEx> r):
|
||||
ECIESTunnelHopConfig (r) {};
|
||||
uint8_t GetRetCode (const uint8_t * records) const
|
||||
{ return (records + recordIndex*SHORT_TUNNEL_BUILD_RECORD_SIZE)[SHORT_RESPONSE_RECORD_RET_OFFSET]; };
|
||||
void CreateBuildRequestRecord (uint8_t * records, uint32_t replyMsgID);
|
||||
bool DecryptBuildResponseRecord (uint8_t * records) const;
|
||||
uint8_t GetRetCode (const uint8_t * records) const override
|
||||
{ return (records + recordIndex*SHORT_TUNNEL_BUILD_RECORD_SIZE)[SHORT_RESPONSE_RECORD_RET_OFFSET]; };
|
||||
void CreateBuildRequestRecord (uint8_t * records, uint32_t replyMsgID) override;
|
||||
bool DecryptBuildResponseRecord (uint8_t * records) const override;
|
||||
void DecryptRecord (uint8_t * records, int index) const override; // Chacha20
|
||||
uint64_t GetGarlicKey (uint8_t * key) const override;
|
||||
};
|
||||
|
||||
uint64_t GetGarlicKey (uint8_t * key) const override;
|
||||
};
|
||||
|
||||
class TunnelConfig
|
||||
{
|
||||
public:
|
||||
|
||||
TunnelConfig (const std::vector<std::shared_ptr<const i2p::data::IdentityEx> >& peers,
|
||||
TunnelConfig (const std::vector<std::shared_ptr<const i2p::data::IdentityEx> >& peers,
|
||||
bool isShort = false): // inbound
|
||||
m_IsShort (isShort)
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ namespace tunnel
|
|||
}
|
||||
|
||||
bool IsShort () const { return m_IsShort; }
|
||||
|
||||
|
||||
TunnelHopConfig * GetFirstHop () const
|
||||
{
|
||||
return m_FirstHop;
|
||||
|
@ -203,12 +203,12 @@ namespace tunnel
|
|||
if (m_IsShort)
|
||||
hop = new ShortECIESTunnelHopConfig (it);
|
||||
else
|
||||
{
|
||||
{
|
||||
if (it->GetCryptoKeyType () == i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD)
|
||||
hop = new LongECIESTunnelHopConfig (it);
|
||||
else
|
||||
hop = new ElGamalTunnelHopConfig (it);
|
||||
}
|
||||
}
|
||||
if (prev)
|
||||
prev->SetNext (hop);
|
||||
else
|
||||
|
|
|
@ -344,7 +344,7 @@ namespace net
|
|||
if(fd > 0)
|
||||
{
|
||||
ifreq ifr;
|
||||
strncpy(ifr.ifr_name, ifa->ifa_name, IFNAMSIZ); // set interface for query
|
||||
strncpy(ifr.ifr_name, ifa->ifa_name, IFNAMSIZ-1); // set interface for query
|
||||
if(ioctl(fd, SIOCGIFMTU, &ifr) >= 0)
|
||||
mtu = ifr.ifr_mtu; // MTU
|
||||
else
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2021, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
@ -16,7 +16,7 @@
|
|||
#define MAKE_VERSION_NUMBER(a,b,c) ((a*100+b)*100+c)
|
||||
|
||||
#define I2PD_VERSION_MAJOR 2
|
||||
#define I2PD_VERSION_MINOR 38
|
||||
#define I2PD_VERSION_MINOR 39
|
||||
#define I2PD_VERSION_MICRO 0
|
||||
#define I2PD_VERSION_PATCH 0
|
||||
#define I2PD_VERSION MAKE_VERSION(I2PD_VERSION_MAJOR, I2PD_VERSION_MINOR, I2PD_VERSION_MICRO)
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#define I2P_VERSION_MAJOR 0
|
||||
#define I2P_VERSION_MINOR 9
|
||||
#define I2P_VERSION_MICRO 50
|
||||
#define I2P_VERSION_MICRO 51
|
||||
#define I2P_VERSION_PATCH 0
|
||||
#define I2P_VERSION MAKE_VERSION(I2P_VERSION_MAJOR, I2P_VERSION_MINOR, I2P_VERSION_MICRO)
|
||||
#define I2P_VERSION_NUMBER MAKE_VERSION_NUMBER(I2P_VERSION_MAJOR, I2P_VERSION_MINOR, I2P_VERSION_MICRO)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue