sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (9b422154fc981c2f8d95038105f9870eeb6719a6)
- From: Pavel Vinogradov <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (9b422154fc981c2f8d95038105f9870eeb6719a6)
- Date: Sat, 25 Sep 2021 20:46:21 +0000
GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemaage.org>:
net/i2pd/BUILD | 17 +-
net/i2pd/CONFIGURE | 37 +++-
net/i2pd/DEPENDS | 12 +
net/i2pd/DETAILS | 1
net/i2pd/HISTORY | 5
net/i2pd/INSTALL | 5
net/i2pd/PRE_BUILD | 10 -
net/i2pd/gcc46.patch | 391
----------------------------------------------
net/i2pd/gcc46_upnp.patch | 31 ---
9 files changed, 63 insertions(+), 446 deletions(-)
New commits:
commit 9b422154fc981c2f8d95038105f9870eeb6719a6
Author: Pavel Vinogradov <public AT sourcemaage.org>
Commit: Pavel Vinogradov <public AT sourcemaage.org>
net/i2pd: uses cmake from now on + more options
diff --git a/net/i2pd/BUILD b/net/i2pd/BUILD
index 97330af..e2fb09c 100755
--- a/net/i2pd/BUILD
+++ b/net/i2pd/BUILD
@@ -6,8 +6,15 @@ if spell_ok gcc && is_version_less $(installed_version gcc)
4.7; then
LDFLAGS="-lboost_chrono ${LDFLAGS}"
fi &&
-make $OPTS all api api_client &&
-
-if list_find "$LDFLAGS" "-s"; then
- make strip
-fi
+cd build &&
+prepare_cmake_flags &&
+cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_ROOT}/usr \
+ -DCMAKE_INSTALL_SYSCONFDIR=${INSTALL_ROOT}/etc \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCMAKE_INSTALL_BINDIR=sbin \
+ -DCMAKE_BUILD_TYPE=${CM_BUILD_TYPE} \
+ -DCMAKE_C_FLAGS_RELEASE="${CFLAGS}" \
+ -DCMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
+ ${OPTS} . &&
+cmake --build .
diff --git a/net/i2pd/CONFIGURE b/net/i2pd/CONFIGURE
index 52611f5..ba47ca2 100755
--- a/net/i2pd/CONFIGURE
+++ b/net/i2pd/CONFIGURE
@@ -1,7 +1,36 @@
+source "${GRIMOIRE}/CMAKE_CONFIGURE" &&
+
+list_remove I2PD_OPTS "USE_MESHNET=yes" &&
+list_remove I2PD_OPTS "USE_MESHNET=no" &&
+list_remove I2PD_OPTS "WEBSOCKETS=yes" &&
+list_remove I2PD_OPTS "WEBSOCKETS=no" &&
+
+config_query_option I2PD_OPTS "Enable AES-NI support?" n \
+ "-DWITH_AESNI=ON" \
+ "-DWITH_AESNI=OFF" &&
+
+config_query_option I2PD_OPTS "Enable AVX support?" n \
+ "-DWITH_AVX=ON" \
+ "-DWITH_AVX=OFF" &&
+
+config_query_option I2PD_OPTS "Enable hardening support?" n \
+ "-DWITH_HARDENING=ON" \
+ "-DWITH_HARDENING=OFF" &&
+
+config_query_option I2PD_OPTS "Build with Address Sanitizer?" n \
+ "-DWITH_ADDRSANITIZER=ON" \
+ "-DWITH_ADDRSANITIZER=OFF" &&
+
+if list_find I2PD_OPTS "-DWITH_ADDRSANITIZER=OFF"; then
+ config_query_option I2PD_OPTS "Build with Thread Sanitizer?" n \
+ "-DWITH_THREADSANITIZER=ON" \
+ "-DWITH_THREADSANITIZER=OFF"
+fi &&
+
config_query_option I2PD_OPTS "Enable MeshNet support?" n \
- "USE_MESHNET=yes" \
- "USE_MESHNET=no" &&
+ "-DWITH_MESHNET=ON" \
+ "-DWITH_MESHNET=OFF" &&
config_query_option I2PD_OPTS "Enable WebSockets support?" n \
- "WEBSOCKETS=yes" \
- "WEBSOCKETS=no"
+ "-DWITH_WEBSOCKETS=ON" \
+ "-DWITH_WEBSOCKETS=OFF"
diff --git a/net/i2pd/DEPENDS b/net/i2pd/DEPENDS
index 4fb20cc..8347933 100755
--- a/net/i2pd/DEPENDS
+++ b/net/i2pd/DEPENDS
@@ -1,4 +1,5 @@
. "${GRIMOIRE}/FUNCTIONS" &&
+source "${GRIMOIRE}/CMAKE_DEPENDS" &&
local BOOST_SUBDEPS="SYSTEM DATE_TIME FILESYSTEM PROGRAM_OPTIONS" &&
@@ -12,6 +13,11 @@ depends SSL &&
depends zlib &&
optional_depends miniupnpc \
- "USE_UPNP=yes" \
- "USE_UPNP=no" \
- "for UPnP support"
+ "-DWITH_UPNP=ON" \
+ "-DWITH_UPNP=OFF" \
+ "for UPnP support" &&
+
+optional_depends LUA \
+ "-DWITH_I2LUA=ON" \
+ "-DWITH_I2LUA=OFF" \
+ "for Lua support"
diff --git a/net/i2pd/DETAILS b/net/i2pd/DETAILS
index 4d04fac..f72885f 100755
--- a/net/i2pd/DETAILS
+++ b/net/i2pd/DETAILS
@@ -1,3 +1,4 @@
+source "${GRIMOIRE}/CMAKE_FUNCTIONS"
SPELL=i2pd
VERSION=2.39.0
SOURCE=${SPELL}-${VERSION}.tar.gz
diff --git a/net/i2pd/HISTORY b/net/i2pd/HISTORY
index c997b81..7afc24a 100644
--- a/net/i2pd/HISTORY
+++ b/net/i2pd/HISTORY
@@ -1,3 +1,8 @@
+2021-09-25 Pavel Vinogradov <public AT sourcemage.org>
+ * BUILD, cONFIGURE, DETAILS, INSTALL: converted to cmake, added
options for
+ AES-NI, AVX, hardening, sanitizers; optionally depends on LUA
+ * PRE_BUILD, gcc46{,_upnp}.patch: dropped, don't work in this version
+
2021-09-23 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 2.39.0
diff --git a/net/i2pd/INSTALL b/net/i2pd/INSTALL
index 05aa15d..601e93e 100755
--- a/net/i2pd/INSTALL
+++ b/net/i2pd/INSTALL
@@ -1,5 +1,6 @@
-install -vm 755 i2pd "${INSTALL_ROOT}/usr/sbin/i2pd" &&
-install -vm 755 libi2pd.so libi2pdclient.so "${INSTALL_ROOT}/usr/lib" &&
+default_install &&
+
+cd ${SOURCE_DIRECTORY} &&
install -vm 755 -d "${INSTALL_ROOT}/usr/share/i2pd" &&
cp -vr contrib/certificates "${INSTALL_ROOT}/usr/share/i2pd" &&
diff --git a/net/i2pd/PRE_BUILD b/net/i2pd/PRE_BUILD
deleted file mode 100755
index f1af7bd..0000000
--- a/net/i2pd/PRE_BUILD
+++ /dev/null
@@ -1,10 +0,0 @@
-default_pre_build &&
-cd "${SOURCE_DIRECTORY}" &&
-
-if spell_ok gcc && is_version_less $(installed_version gcc) 4.7; then
- patch -p0 < "${SPELL_DIRECTORY}/gcc46.patch" &&
-
- if is_depends_enabled ${SPELL} miniupnpc; then
- patch -p0 < "${SPELL_DIRECTORY}/gcc46_upnp.patch"
- fi
-fi
diff --git a/net/i2pd/gcc46.patch b/net/i2pd/gcc46.patch
deleted file mode 100644
index b49a639..0000000
--- a/net/i2pd/gcc46.patch
+++ /dev/null
@@ -1,391 +0,0 @@
---- Makefile.linux.orig 2017-08-17 15:44:59.293424249 -0400
-+++ Makefile.linux 2017-08-17 15:46:10.575386368 -0400
-@@ -18,7 +18,7 @@
- else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
- NEEDED_CXXFLAGS += -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1
- else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
-- NEEDED_CXXFLAGS += -std=c++0x
-+ NEEDED_CXXFLAGS += -std=c++0x -D_GLIBCXX_USE_NANOSLEEP=1
- else ifeq ($(shell expr match ${CXXVER} "[5-9]"),1) # gcc >= 5
- NEEDED_CXXFLAGS += -std=c++11
- LDLIBS = -latomic
---- libi2pd/Tunnel.cpp.orig 2016-10-17 00:37:40.000000000 -0400
-+++ libi2pd/Tunnel.cpp 2016-10-19 19:56:06.096526898 -0400
-@@ -406,7 +406,7 @@
-
- void Tunnels::AddTransitTunnel (std::shared_ptr<TransitTunnel> tunnel)
- {
-- if (m_Tunnels.emplace (tunnel->GetTunnelID (), tunnel).second)
-+ if (m_Tunnels.insert (make_pair(tunnel->GetTunnelID (),
tunnel)).second)
- m_TransitTunnels.push_back (tunnel);
- else
- LogPrint (eLogError, "Tunnel: tunnel with id ",
tunnel->GetTunnelID (), " already exists");
-@@ -808,7 +808,7 @@
-
- void Tunnels::AddInboundTunnel (std::shared_ptr<InboundTunnel>
newTunnel)
- {
-- if (m_Tunnels.emplace (newTunnel->GetTunnelID (),
newTunnel).second)
-+ if (m_Tunnels.insert (make_pair(newTunnel->GetTunnelID (),
newTunnel)).second)
- {
- m_InboundTunnels.push_back (newTunnel);
- auto pool = newTunnel->GetTunnelPool ();
---- libi2pd/TunnelPool.h.orig
-+++ libi2pd/TunnelPool.h
-@@ -123,8 +123,8 @@
- std::mutex m_CustomPeerSelectorMutex;
- ITunnelPeerSelector * m_CustomPeerSelector;
-
-- uint64_t m_MinLatency=0; // if > 0 this tunnel pool will try
building tunnels with minimum latency by ms
-- uint64_t m_MaxLatency=0; // if > 0 this tunnel pool will try
building tunnels with maximum latency by ms
-+ uint64_t m_MinLatency; // if > 0 this tunnel pool will try
building tunnels with minimum latency by ms
-+ uint64_t m_MaxLatency; // if > 0 this tunnel pool will try
building tunnels with maximum latency by ms
-
- public:
-
---- libi2pd/TunnelPool.cpp.orig
-+++ libi2pd/TunnelPool.cpp
-@@ -14,6 +14,12 @@
- #include "Event.h"
- #endif
-
-+template<typename T> struct decltype_t {
-+ typedef T type;
-+};
-+
-+#define DECLTYPE(expr) decltype_t<decltype(expr)>::type
-+
- namespace i2p
- {
- namespace tunnel
-@@ -22,7 +28,7 @@
- TunnelPool::TunnelPool (int numInboundHops, int numOutboundHops, int
numInboundTunnels, int numOutboundTunnels):
- m_NumInboundHops (numInboundHops), m_NumOutboundHops
(numOutboundHops),
- m_NumInboundTunnels (numInboundTunnels), m_NumOutboundTunnels
(numOutboundTunnels), m_IsActive (true),
-- m_CustomPeerSelector(nullptr)
-+ m_CustomPeerSelector(nullptr), m_MinLatency(0),
m_MaxLatency(0)
- {
- }
-
-@@ -326,7 +332,7 @@
- buf += 4;
- uint64_t timestamp = bufbe64toh (buf);
-
-- decltype(m_Tests)::mapped_type test;
-+ DECLTYPE(m_Tests)::mapped_type test;
- bool found = false;
- {
- std::unique_lock<std::mutex> l(m_TestsMutex);
---- libi2pd/Event.h.orig 2017-02-16 13:28:19.692773653 -0500
-+++ libi2pd/Event.h 2017-02-16 13:30:19.903805378 -0500
-@@ -25,6 +25,7 @@
- class EventCore
- {
- public:
-+ EventCore(): m_listener(nullptr) {}
- void QueueEvent(const EventType & ev);
- void CollectEvent(const std::string & type, const std::string &
ident, uint64_t val);
- void SetListener(EventListener * l);
-@@ -39,7 +40,7 @@
- uint64_t Val;
- };
- std::map<std::string, CollectedEvent> m_collected;
-- EventListener * m_listener = nullptr;
-+ EventListener * m_listener;
- };
- #ifdef WITH_EVENTS
- extern EventCore core;
- extern EventCore core;
---- libi2pd/Log.cpp.orig
-+++ libi2pd/Log.cpp
-@@ -31,12 +31,12 @@
- static const char *LogMsgColors[] = { "", "", "", "", "", "" };
- #else /* UNIX */
- static const char *LogMsgColors[] = {
-- [eLogNone] = "\033[0m", /* reset */
-- [eLogError] = "\033[1;31m", /* red */
-- [eLogWarning] = "\033[1;33m", /* yellow */
-- [eLogInfo] = "\033[1;36m", /* cyan */
-- [eLogDebug] = "\033[1;34m", /* blue */
-- [eNumLogLevels] = "\033[0m", /* reset */
-+ "\033[0m", /* reset */
-+ "\033[1;31m", /* red */
-+ "\033[1;33m", /* yellow */
-+ "\033[1;36m", /* cyan */
-+ "\033[1;34m", /* blue */
-+ "\033[0m", /* reset */
- };
- #endif
-
---- libi2pd_client/HTTPProxy.h.orig 2017-12-04 13:40:32.000000000 -0500
-+++ libi2pd_client/HTTPProxy.h 2017-12-07 13:14:26.956591634 -0500
-@@ -7,8 +7,6 @@
- {
- public:
- HTTPProxy(const std::string& name, const std::string&
address, int port, const std::string & outproxy, bool addresshelper,
std::shared_ptr<i2p::client::ClientDestination> localDestination);
-- HTTPProxy(const std::string& name, const std::string&
address, int port, std::shared_ptr<i2p::client::ClientDestination>
localDestination = nullptr) :
-- HTTPProxy(name, address, port, "", true,
localDestination) {} ;
- ~HTTPProxy() {};
-
- std::string GetOutproxyURL() const { return
m_OutproxyUrl; }
---- libi2pd/Ed25519.h.orig 2018-06-26 10:46:01.000000000 -0700
-+++ libi2pd/Ed25519.h 2018-06-27 16:24:25.365149870 -0700
-@@ -10,14 +10,14 @@
- {
- struct EDDSAPoint
- {
-- BIGNUM * x {nullptr};
-- BIGNUM * y {nullptr};
-- BIGNUM * z {nullptr};
-- BIGNUM * t {nullptr}; // projective coordinates
-+ BIGNUM * x;
-+ BIGNUM * y;
-+ BIGNUM * z;
-+ BIGNUM * t; // projective coordinates
-
-- EDDSAPoint () {}
-- EDDSAPoint (const EDDSAPoint& other) { *this = other; }
-- EDDSAPoint (EDDSAPoint&& other) { *this = std::move
(other); }
-+ EDDSAPoint (): x(nullptr), y(nullptr), z(nullptr), t(nullptr)
{}
-+ EDDSAPoint (const EDDSAPoint& other): x(nullptr), y(nullptr),
z(nullptr), t(nullptr) { *this = other; }
-+ EDDSAPoint (EDDSAPoint&& other): x(nullptr), y(nullptr),
z(nullptr), t(nullptr) { *this = std::move (other); }
- EDDSAPoint (BIGNUM * x1, BIGNUM * y1, BIGNUM * z1 = nullptr,
BIGNUM * t1 = nullptr)
- : x(x1)
- , y(y1)
---- libi2pd/NTCPSession.cpp.orig 2018-06-26 10:46:01.000000000 -0700
-+++ libi2pd/NTCPSession.cpp 2018-07-23 21:11:18.917335635 -0700
-@@ -183,7 +183,7 @@
- }
- }
- // TODO: check for number of pending keys
-- auto work = new NTCPWork{shared_from_this()};
-+ auto work = new NTCPWork({{shared_from_this()}});
- m_Server.Work(work->session, [work, this]() ->
std::function<void(void)> {
- if (!work->session->m_DHKeysPair)
- work->session->m_DHKeysPair =
transports.GetNextDHKeysPair ();
-@@ -249,7 +249,7 @@
- }
- else
- {
-- auto work = new NTCPWork{shared_from_this()};
-+ auto work = new NTCPWork({{shared_from_this()}});
- m_Server.Work(work->session, [work, this]() ->
std::function<void(void)> {
- work->session->CreateAESKey
(work->session->m_Establisher->phase2.pubKey);
- return std::bind(&NTCPSession::HandlePhase2,
work->session, work);
---- libi2pd_client/I2PService.h.orig 2018-06-26 10:46:01.000000000 -0700
-+++ libi2pd_client/I2PService.h 2018-07-23 21:14:32.314300936 -0700
-@@ -70,7 +70,7 @@
- bool m_ReadyTimerTriggered;
- uint32_t m_ConnectTimeout;
-
-- const size_t NEVER_TIMES_OUT = 0;
-+ const size_t NEVER_TIMES_OUT;
-
- public:
- bool isUpdated; // transient, used during reload only
---- libi2pd_client/I2PService.cpp.orig 2018-06-26 10:46:01.000000000 -0700
-+++ libi2pd_client/I2PService.cpp 2018-07-23 21:15:59.847520946 -0700
-@@ -16,7 +16,8 @@
- m_ReadyTimer(m_LocalDestination->GetService()),
- m_ReadyTimerTriggered(false),
- m_ConnectTimeout(0),
-- isUpdated (true)
-+ isUpdated (true),
-+ NEVER_TIMES_OUT(0)
- {
- m_LocalDestination->Acquire ();
- }
-@@ -26,7 +26,8 @@
- m_LocalDestination
(i2p::client::context.CreateNewLocalDestination (false, kt)),
- m_ReadyTimer(m_LocalDestination->GetService()),
- m_ConnectTimeout(0),
-- isUpdated (true)
-+ isUpdated (true),
-+ NEVER_TIMES_OUT(0)
- {
- m_LocalDestination->Acquire ();
- }
---- libi2pd/RouterInfo.h.orig 2018-08-23 08:10:05.000000000 -0700
-+++ libi2pd/RouterInfo.h 2018-08-25 09:48:51.706887850 -0700
-@@ -92,10 +92,12 @@
-
- struct NTCP2Ext
- {
-+ NTCP2Ext(): isPublished(false),
isNTCP2Only(false) {};
-+
- Tag<32> staticKey;
- Tag<16> iv;
-- bool isPublished = false;
-- bool isNTCP2Only = false;
-+ bool isPublished;
-+ bool isNTCP2Only;
- };
-
- struct Address
---- libi2pd/Blinding.h.orig 2020-02-25 09:08:50.000000000 -0800
-+++ libi2pd/Blinding.h 2020-02-26 17:03:22.152844367 -0800
-@@ -39,7 +39,7 @@
-
- std::vector<uint8_t> m_PublicKey;
- i2p::data::SigningKeyType m_SigType, m_BlindedSigType;
-- bool m_IsClientAuth = false;
-+ bool m_IsClientAuth;
- };
- }
- }
---- libi2pd/LeaseSet.h.orig 2020-02-25 09:08:50.000000000 -0800
-+++ libi2pd/LeaseSet.h 2020-02-26 17:21:50.775527499 -0800
-@@ -165,8 +165,8 @@
- private:
-
- uint8_t m_StoreType;
-- uint32_t m_PublishedTimestamp = 0;
-- bool m_IsPublic = true, m_IsPublishedEncrypted =
false;
-+ uint32_t m_PublishedTimestamp;
-+ bool m_IsPublic, m_IsPublishedEncrypted;
- std::shared_ptr<i2p::crypto::Verifier>
m_TransientVerifier;
- CryptoKeyType m_EncryptionType;
- std::shared_ptr<i2p::crypto::CryptoKeyEncryptor>
m_Encryptor; // for standardLS2
---- libi2pd/LeaseSet.cpp.orig 2020-02-25 09:08:50.000000000 -0800
-+++ libi2pd/LeaseSet.cpp 2020-02-26 17:20:39.170099671 -0800
-@@ -252,7 +252,7 @@
- }
-
- LeaseSet2::LeaseSet2 (uint8_t storeType, const uint8_t * buf, size_t
len, bool storeLeases, CryptoKeyType preferredCrypto):
-- LeaseSet (storeLeases), m_StoreType (storeType),
m_EncryptionType (preferredCrypto)
-+ LeaseSet (storeLeases), m_StoreType (storeType),
m_EncryptionType (preferredCrypto), m_PublishedTimestamp (0), m_IsPublic
(true), m_IsPublishedEncrypted (false)
- {
- SetBuffer (buf, len);
- if (storeType == NETDB_STORE_TYPE_ENCRYPTED_LEASESET2)
-@@ -263,7 +263,7 @@
-
- LeaseSet2::LeaseSet2 (const uint8_t * buf, size_t len,
std::shared_ptr<const BlindedPublicKey> key,
- const uint8_t * secret, CryptoKeyType preferredCrypto):
-- LeaseSet (true), m_StoreType
(NETDB_STORE_TYPE_ENCRYPTED_LEASESET2), m_EncryptionType (preferredCrypto)
-+ LeaseSet (true), m_StoreType
(NETDB_STORE_TYPE_ENCRYPTED_LEASESET2), m_EncryptionType (preferredCrypto),
m_PublishedTimestamp (0), m_IsPublic (true), m_IsPublishedEncrypted (false)
- {
- ReadFromBufferEncrypted (buf, len, key, secret);
- }
---- libi2pd/RouterContext.h.orig 2020-02-25 09:08:50.000000000 -0800
-+++ libi2pd/RouterContext.h 2020-02-26 17:25:18.440768256 -0800
-@@ -5,7 +5,7 @@
- #include <string>
- #include <memory>
- #include <mutex>
--#include <chrono>
-+#include <boost/chrono.hpp>
- #include <boost/asio.hpp>
- #include "Identity.h"
- #include "RouterInfo.h"
-@@ -142,7 +142,7 @@
- std::shared_ptr<i2p::crypto::CryptoKeyDecryptor>
m_Decryptor;
- uint64_t m_LastUpdateTime; // in seconds
- bool m_AcceptsTunnels, m_IsFloodfill;
-- std::chrono::time_point<std::chrono::steady_clock>
m_StartupTime;
-+
boost::chrono::time_point<boost::chrono::steady_clock> m_StartupTime;
- uint64_t m_BandwidthLimit; // allowed bandwidth
- int m_ShareRatio;
- RouterStatus m_Status;
---- libi2pd/RouterContext.cpp.orig 2020-02-25 09:08:50.000000000 -0800
-+++ libi2pd/RouterContext.cpp 2020-02-26 17:26:07.070058807 -0800
-@@ -27,7 +27,7 @@
- void RouterContext::Init ()
- {
- srand (i2p::util::GetMillisecondsSinceEpoch () % 1000);
-- m_StartupTime = std::chrono::steady_clock::now();
-+ m_StartupTime = boost::chrono::steady_clock::now();
-
- if (!Load ())
- CreateNewRouter ();
-@@ -717,7 +717,7 @@
-
- uint32_t RouterContext::GetUptime () const
- {
-- return std::chrono::duration_cast<std::chrono::seconds>
(std::chrono::steady_clock::now() - m_StartupTime).count ();
-+ return boost::chrono::duration_cast<boost::chrono::seconds>
(boost::chrono::steady_clock::now() - m_StartupTime).count ();
- }
-
- bool RouterContext::Decrypt (const uint8_t * encrypted, uint8_t *
data, BN_CTX * ctx) const
---- libi2pd/ECIESX25519AEADRatchetSession.h.orig 2020-02-25
09:08:50.000000000 -0800
-+++ libi2pd/ECIESX25519AEADRatchetSession.h 2020-02-26 18:05:27.839321012
-0800
-@@ -115,10 +115,10 @@
- uint8_t m_H[32], m_CK[64] /* [chainkey, key] */,
m_RemoteStaticKey[32];
- uint8_t m_Aepk[32]; // Alice's ephemeral keys TODO:
for incoming only
- i2p::crypto::X25519Keys m_EphemeralKeys;
-- SessionState m_State = eSessionStateNew;
-- uint64_t m_LastActivityTimestamp = 0; // incoming
-+ SessionState m_State;
-+ uint64_t m_LastActivityTimestamp; // incoming
- RatchetTagSet m_SendTagset, m_ReceiveTagset;
-- int m_NumReceiveTags = 0;
-+ int m_NumReceiveTags;
- std::unique_ptr<i2p::data::IdentHash>
m_Destination;// TODO: might not need it
- };
- }
---- libi2pd/ECIESX25519AEADRatchetSession.cpp.orig 2020-02-25
09:08:50.000000000 -0800
-+++ libi2pd/ECIESX25519AEADRatchetSession.cpp 2020-02-26 18:08:10.465397719
-0800
-@@ -61,7 +61,7 @@
- }
-
- ECIESX25519AEADRatchetSession::ECIESX25519AEADRatchetSession
(GarlicDestination * owner):
-- GarlicRoutingSession (owner, true)
-+ GarlicRoutingSession (owner, true), m_State(eSessionStateNew),
m_LastActivityTimestamp(0), m_NumReceiveTags(0)
- {
- ResetKeys ();
- }
---- libi2pd/Garlic.cpp.orig 2020-02-25 09:08:50.000000000 -0800
-+++ libi2pd/Garlic.cpp 2020-02-26 18:22:34.385236705 -0800
-@@ -959,7 +959,7 @@
-
- void GarlicDestination::AddECIESx25519SessionTag (int index, uint64_t
tag, ECIESX25519AEADRatchetSessionPtr session)
- {
-- m_ECIESx25519Tags.emplace (tag,
ECIESX25519AEADRatchetIndexSession{index, session,
i2p::util::GetSecondsSinceEpoch ()});
-+ m_ECIESx25519Tags.insert({tag,
ECIESX25519AEADRatchetIndexSession{index, session,
i2p::util::GetSecondsSinceEpoch ()}});
- }
-
- void GarlicDestination::AddECIESx25519Session (const uint8_t *
staticKey, ECIESX25519AEADRatchetSessionPtr session)
-@@ -976,7 +976,7 @@
- return;
- }
- }
-- m_ECIESx25519Sessions.emplace (staticKeyTag, session);
-+ m_ECIESx25519Sessions.insert({staticKeyTag, session});
- }
-
- }
---- libi2pd/Timestamp.cpp.orig 2020-02-25 09:08:50.000000000 -0800
-+++ libi2pd/Timestamp.cpp 2020-02-26 18:38:19.787128311 -0800
-@@ -187,7 +187,7 @@
-
- void GetDateString (uint64_t timestamp, char * date)
- {
-- using clock = std::chrono::system_clock;
-+ typedef std::chrono::system_clock clock;
- auto t = clock::to_time_t (clock::time_point
(std::chrono::seconds(timestamp)));
- struct tm tm;
- #ifdef _WIN32
---- libi2pd/Identity.h.orig 2020-02-25 09:08:50.000000000 -0800
-+++ libi2pd/Identity.h 2020-02-27 14:45:08.012926508 -0800
-@@ -135,9 +135,9 @@
- {
- public:
-
-- PrivateKeys () = default;
-- PrivateKeys (const PrivateKeys& other) { *this =
other; };
-- PrivateKeys (const Keys& keys) { *this = keys; };
-+ PrivateKeys (): m_TransientSignatureLen(0),
m_TransientSigningPrivateKeyLen(0) {};
-+ PrivateKeys (const PrivateKeys& other):
m_TransientSignatureLen(0), m_TransientSigningPrivateKeyLen(0) { *this =
other; };
-+ PrivateKeys (const Keys& keys):
m_TransientSignatureLen(0), m_TransientSigningPrivateKeyLen(0) { *this =
keys; };
- PrivateKeys& operator=(const Keys& keys);
- PrivateKeys& operator=(const PrivateKeys& other);
- ~PrivateKeys () = default;
-@@ -182,8 +182,8 @@
- uint8_t m_SigningPrivateKey[128]; // assume private
key doesn't exceed 128 bytes
- mutable std::unique_ptr<i2p::crypto::Signer> m_Signer;
- std::vector<uint8_t> m_OfflineSignature; // non zero
length, if applicable
-- size_t m_TransientSignatureLen = 0;
-- size_t m_TransientSigningPrivateKeyLen = 0;
-+ size_t m_TransientSignatureLen;
-+ size_t m_TransientSigningPrivateKeyLen;
- };
-
- // kademlia
diff --git a/net/i2pd/gcc46_upnp.patch b/net/i2pd/gcc46_upnp.patch
deleted file mode 100644
index a5c3c9e..0000000
--- a/net/i2pd/gcc46_upnp.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- daemon/UPnP.h.orig 2016-10-17 00:37:40.000000000 -0400
-+++ daemon/UPnP.h 2016-10-19 20:56:18.628270468 -0400
-@@ -60,7 +60,7 @@
- std::mutex m_StartedMutex;
- boost::asio::io_service m_Service;
- boost::asio::deadline_timer m_Timer;
-- bool m_upnpUrlsInitialized=false;
-+ bool m_upnpUrlsInitialized;
- struct UPNPUrls m_upnpUrls;
- struct IGDdatas m_upnpData;
-
-@@ -65,7 +65,7 @@
- struct IGDdatas m_upnpData;
-
- // For miniupnpc
-- struct UPNPDev * m_Devlist = 0;
-+ struct UPNPDev * m_Devlist;
- char m_NetworkAddr[64];
- char m_externalIPAddress[40];
- };
---- daemon/UPnP.cpp.orig 2016-10-17 00:37:40.000000000 -0400
-+++ daemon/UPnP.cpp 2016-10-19 21:02:23.135699101 -0400
-@@ -22,7 +22,7 @@
- {
- namespace transport
- {
-- UPnP::UPnP () : m_IsRunning(false), m_Thread (nullptr), m_Timer
(m_Service)
-+ UPnP::UPnP () : m_IsRunning(false), m_Thread (nullptr), m_Timer
(m_Service), m_Devlist(0), m_upnpUrlsInitialized(false)
- {
- }
-
- [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (9b422154fc981c2f8d95038105f9870eeb6719a6), Pavel Vinogradov, 09/25/2021
Archive powered by MHonArc 2.6.24.