Import ProxyHandshake into beast

This commit is contained in:
Vinnie Falco
2013-08-10 03:24:32 -07:00
parent e187e7e282
commit 95ec3f4db5
9 changed files with 51 additions and 21 deletions

View File

@@ -301,12 +301,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\modules\ripple_app\network\ripple_ProxyHandshake.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\modules\ripple_app\network\ripple_WSHandler.cpp"> <ClCompile Include="..\..\modules\ripple_app\network\ripple_WSHandler.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@@ -1431,7 +1425,6 @@
<ClInclude Include="..\..\modules\ripple_app\misc\ripple_ProofOfWorkFactory.h" /> <ClInclude Include="..\..\modules\ripple_app\misc\ripple_ProofOfWorkFactory.h" />
<ClInclude Include="..\..\modules\ripple_app\misc\ripple_SerializedLedger.h" /> <ClInclude Include="..\..\modules\ripple_app\misc\ripple_SerializedLedger.h" />
<ClInclude Include="..\..\modules\ripple_app\misc\ripple_SerializedTransaction.h" /> <ClInclude Include="..\..\modules\ripple_app\misc\ripple_SerializedTransaction.h" />
<ClInclude Include="..\..\modules\ripple_app\network\ripple_ProxyHandshake.h" />
<ClInclude Include="..\..\modules\ripple_app\network\ripple_WSHandler.h" /> <ClInclude Include="..\..\modules\ripple_app\network\ripple_WSHandler.h" />
<ClInclude Include="..\..\modules\ripple_app\network\WSConnection.h" /> <ClInclude Include="..\..\modules\ripple_app\network\WSConnection.h" />
<ClInclude Include="..\..\modules\ripple_app\network\WSDoor.h" /> <ClInclude Include="..\..\modules\ripple_app\network\WSDoor.h" />

View File

@@ -873,9 +873,6 @@
<ClCompile Include="..\..\modules\ripple_app\main\ripple_FatalErrorReporter.cpp"> <ClCompile Include="..\..\modules\ripple_app\main\ripple_FatalErrorReporter.cpp">
<Filter>[1] Ripple\ripple_app\main</Filter> <Filter>[1] Ripple\ripple_app\main</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\modules\ripple_app\network\ripple_ProxyHandshake.cpp">
<Filter>[1] Ripple\ripple_app\network</Filter>
</ClCompile>
<ClCompile Include="..\..\modules\ripple_app\main\ripple_RippleMain.cpp"> <ClCompile Include="..\..\modules\ripple_app\main\ripple_RippleMain.cpp">
<Filter>[1] Ripple\ripple_app\main</Filter> <Filter>[1] Ripple\ripple_app\main</Filter>
</ClCompile> </ClCompile>
@@ -1667,9 +1664,6 @@
<ClInclude Include="..\..\BeastConfig.h"> <ClInclude Include="..\..\BeastConfig.h">
<Filter>[2] Build</Filter> <Filter>[2] Build</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\modules\ripple_app\network\ripple_ProxyHandshake.h">
<Filter>[1] Ripple\ripple_app\network</Filter>
</ClInclude>
<ClInclude Include="..\..\modules\ripple_app\main\ripple_RippleMain.h"> <ClInclude Include="..\..\modules\ripple_app\main\ripple_RippleMain.h">
<Filter>[1] Ripple\ripple_app\main</Filter> <Filter>[1] Ripple\ripple_app\main</Filter>
</ClInclude> </ClInclude>

View File

@@ -70,6 +70,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\modules\beast_asio\beast_asio.h" /> <ClInclude Include="..\..\modules\beast_asio\beast_asio.h" />
<ClInclude Include="..\..\modules\beast_asio\protocol\beast_ProxyHandshake.h" />
<ClInclude Include="..\..\modules\beast_asio\sockets\beast_Socket.h" /> <ClInclude Include="..\..\modules\beast_asio\sockets\beast_Socket.h" />
<ClInclude Include="..\..\modules\beast_asio\sockets\beast_SharedSocket.h" /> <ClInclude Include="..\..\modules\beast_asio\sockets\beast_SharedSocket.h" />
<ClInclude Include="..\..\modules\beast_asio\sockets\beast_SocketBase.h" /> <ClInclude Include="..\..\modules\beast_asio\sockets\beast_SocketBase.h" />
@@ -291,6 +292,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\modules\beast_asio\beast_asio.cpp" /> <ClCompile Include="..\..\modules\beast_asio\beast_asio.cpp" />
<ClCompile Include="..\..\modules\beast_asio\protocol\beast_ProxyHandshake.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\modules\beast_asio\sockets\beast_Socket.cpp"> <ClCompile Include="..\..\modules\beast_asio\sockets\beast_Socket.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>

View File

@@ -152,6 +152,9 @@
<Filter Include="beast_asio\tests"> <Filter Include="beast_asio\tests">
<UniqueIdentifier>{422da6a1-e57e-4a96-9fce-e5958c16026e}</UniqueIdentifier> <UniqueIdentifier>{422da6a1-e57e-4a96-9fce-e5958c16026e}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="beast_asio\protocol">
<UniqueIdentifier>{c4a7b6bb-88ec-4ff1-bc56-7c432a467500}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\modules\beast_core\beast_core.h"> <ClInclude Include="..\..\modules\beast_core\beast_core.h">
@@ -809,6 +812,9 @@
<ClInclude Include="..\..\modules\beast_asio\tests\beast_PeerTest.h"> <ClInclude Include="..\..\modules\beast_asio\tests\beast_PeerTest.h">
<Filter>beast_asio\tests</Filter> <Filter>beast_asio\tests</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\modules\beast_asio\protocol\beast_ProxyHandshake.h">
<Filter>beast_asio\protocol</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\modules\beast_core\beast_core.cpp"> <ClCompile Include="..\..\modules\beast_core\beast_core.cpp">
@@ -1261,6 +1267,9 @@
<ClCompile Include="..\..\modules\beast_asio\tests\beast_TestPeerUnitTests.cpp"> <ClCompile Include="..\..\modules\beast_asio\tests\beast_TestPeerUnitTests.cpp">
<Filter>beast_asio\tests</Filter> <Filter>beast_asio\tests</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\modules\beast_asio\protocol\beast_ProxyHandshake.cpp">
<Filter>beast_asio\protocol</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Text Include="..\..\TODO.txt" /> <Text Include="..\..\TODO.txt" />

View File

@@ -28,6 +28,8 @@ namespace beast
#include "sockets/beast_Socket.cpp" #include "sockets/beast_Socket.cpp"
#include "sockets/beast_SslContext.cpp" #include "sockets/beast_SslContext.cpp"
#include "protocol/beast_ProxyHandshake.cpp"
#include "tests/beast_TestPeerBasics.cpp" #include "tests/beast_TestPeerBasics.cpp"
#include "tests/beast_TestPeerLogic.cpp" #include "tests/beast_TestPeerLogic.cpp"
#include "tests/beast_TestPeerLogicSyncServer.cpp" #include "tests/beast_TestPeerLogicSyncServer.cpp"

View File

@@ -56,6 +56,8 @@ namespace beast
#include "sockets/beast_SharedSocket.h" #include "sockets/beast_SharedSocket.h"
#include "sockets/beast_SslContext.h" #include "sockets/beast_SslContext.h"
#include "protocol/beast_ProxyHandshake.h"
#include "tests/beast_TestPeerBasics.h" #include "tests/beast_TestPeerBasics.h"
#include "tests/beast_TestPeer.h" #include "tests/beast_TestPeer.h"
#include "tests/beast_TestPeerDetails.h" #include "tests/beast_TestPeerDetails.h"

View File

@@ -1,6 +1,19 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/* /*
Copyright (c) 2011-2013, OpenCoin, Inc. This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
//============================================================================== //==============================================================================
@@ -269,7 +282,7 @@ bool ProxyHandshake::Version1::parse (void const* headerData, size_t headerBytes
class ProxyHandshakeTests : public UnitTest class ProxyHandshakeTests : public UnitTest
{ {
public: public:
ProxyHandshakeTests () : UnitTest ("ProxyHandshake", "ripple") ProxyHandshakeTests () : UnitTest ("ProxyHandshake", "beast")
{ {
} }

View File

@@ -1,11 +1,24 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/* /*
Copyright (c) 2011-2013, OpenCoin, Inc. This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
//============================================================================== //==============================================================================
#ifndef RIPPLE_PROXYYHANDSHAKE_H_INCLUDED #ifndef BEAST_PROXYYHANDSHAKE_H_INCLUDED
#define RIPPLE_PROXYYHANDSHAKE_H_INCLUDED #define BEAST_PROXYYHANDSHAKE_H_INCLUDED
/** PROXY protocol handshake state machine. /** PROXY protocol handshake state machine.

View File

@@ -239,8 +239,6 @@ static const uint64 tenTo17m1 = tenTo17 - 1;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#include "network/ripple_ProxyHandshake.h" // private?
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if ! defined (RIPPLE_MAIN_PART) || RIPPLE_MAIN_PART == 1 #if ! defined (RIPPLE_MAIN_PART) || RIPPLE_MAIN_PART == 1
@@ -328,7 +326,6 @@ static DH* handleTmpDh (SSL* ssl, int is_export, int iKeyLength)
#include "tx/Transactor.cpp" #include "tx/Transactor.cpp"
#include "network/WSConnection.cpp" #include "network/WSConnection.cpp"
#include "network/WSDoor.cpp" #include "network/WSDoor.cpp"
#include "network/ripple_ProxyHandshake.cpp"
#endif #endif