Skip to content

Commit

Permalink
Gigantic cleanup of all unnecessary files. Renaming of folders to be …
Browse files Browse the repository at this point in the history
…more appropriate to project files.
  • Loading branch information
soshimozi committed Feb 20, 2012
1 parent cdd1336 commit 3e26250
Show file tree
Hide file tree
Showing 394 changed files with 9,641 additions and 9,174 deletions.
16 changes: 13 additions & 3 deletions ClientConsole/ClientConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
<Reference Include="BouncyCastle.Crypto, Version=1.7.4114.6375, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\References\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="Google.ProtocolBuffers, Version=2.4.1.473, Culture=neutral, PublicKeyToken=55f7125234beb589, processorArchitecture=MSIL">
<HintPath>E:\dev\Libraries\protobuf\csharp\Debug\v4.0\Google.ProtocolBuffers.dll</HintPath>
</Reference>
<Reference Include="Google.ProtocolBuffers.Serialization">
<HintPath>E:\dev\Libraries\protobuf\csharp\Debug\v4.0\Google.ProtocolBuffers.Serialization.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
<HintPath>E:\dev\Libraries\log4net\log4net.dll</HintPath>
</Reference>
Expand All @@ -60,15 +66,19 @@
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SocketService.Crypto\SocketServer.Crypto.csproj">
<ProjectReference Include="..\SocketServer.Client\SocketServer.Client.csproj">
<Project>{93FD4F32-5214-40E3-8E36-5B4E354F10C4}</Project>
<Name>SocketServer.Client</Name>
</ProjectReference>
<ProjectReference Include="..\SocketServer.Crypto\SocketServer.Crypto.csproj">
<Project>{4138075A-49CD-4A46-92CB-DFF64A0BB0B6}</Project>
<Name>SocketServer.Crypto</Name>
</ProjectReference>
<ProjectReference Include="..\SocketService.Messages\SocketServer.Messages.csproj">
<ProjectReference Include="..\SocketServer.Messages\SocketServer.Messages.csproj">
<Project>{9394CA0C-0014-4C8B-8795-3A5C45B254EE}</Project>
<Name>SocketServer.Messages</Name>
</ProjectReference>
<ProjectReference Include="..\SocketService.Shared\SocketServer.Shared.csproj">
<ProjectReference Include="..\SocketServer.Shared\SocketServer.Shared.csproj">
<Project>{7C9013CF-CEC4-4F7D-B80D-C6FA2E243CF1}</Project>
<Name>SocketServer.Shared</Name>
</ProjectReference>
Expand Down
32 changes: 16 additions & 16 deletions ClientConsole/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SocketServer;
using System.Threading;
using System.Net.Sockets;
using SocketServer.Shared.Serialization;
Expand All @@ -11,6 +10,7 @@
using SocketServer.Messages;
using SocketServer.Crypto;
using Org.BouncyCastle.Math;
using com.BlazeServer.Messages.MessageProtos;

namespace ClientConsole
{
Expand Down Expand Up @@ -135,11 +135,11 @@ private static void client_MessageReceived(object sender, MessageEventArgs e)
private static void HandleEnableEncryptionResponse(MessageEventArgs e)
{
EnableEncryptionResponse response = e.Message as EnableEncryptionResponse;
encryptionEnabled = response.Enabled;
encryptionEnabled = response.Success;

if (encryptionEnabled)
{
e.ClientConnection.Envelope = new EncryptedMessageEnvelope(
e.ClientConnection.Envelope = new EncryptedMessageEnvelope((ICrypto)
new SharedKeyCrypto(
sa.Parameters,
sa.KeyPair,
Expand All @@ -151,19 +151,19 @@ private static void HandleEnableEncryptionResponse(MessageEventArgs e)

private static void HandleServerConnectResponse(MessageEventArgs e)
{
ServerConnectionResponse response = e.Message as ServerConnectionResponse;

sa = new ServerAuthority(new BigInteger(response.DiffieHellmanInfo.P, 16), new BigInteger(response.DiffieHellmanInfo.G, 16));
serverPublicKey = response.DiffieHellmanInfo.PublicKeyInfo;

// now enable encryption
e.ClientConnection.Send(
new EnableEncryptionMessage()
{
MessageID = "EnableEncryptionMessage",
Enable = true,
PublicKeyInfo = sa.GenerateEncodedPublicKeyInfo()
});
//ServerConnectionResponse response = e.Message as ServerConnectionResponse;

//sa = new ServerAuthority(new BigInteger(response.DiffieHellmanInfo.P, 16), new BigInteger(response.DiffieHellmanInfo.G, 16));
//serverPublicKey = response.DiffieHellmanInfo.PublicKeyInfo;

//// now enable encryption
//e.ClientConnection.Send(
// new EnableEncryptionMessage()
// {
// MessageID = "EnableEncryptionMessage",
// Enable = true,
// PublicKeyInfo = sa.GenerateEncodedPublicKeyInfo()
// });
}

static void client_ClientClosed(object sender, DisconnectedArgs e)
Expand Down
12 changes: 10 additions & 2 deletions ConsoleApplication1/ConsoleApplication1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,19 @@
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SocketService.Client\SocketServer.Client.csproj">
<ProjectReference Include="..\SocketServer.Client\SocketServer.Client.csproj">
<Project>{93FD4F32-5214-40E3-8E36-5B4E354F10C4}</Project>
<Name>SocketServer.Client</Name>
</ProjectReference>
<ProjectReference Include="..\SocketService.Shared\SocketServer.Shared.csproj">
<ProjectReference Include="..\SocketServer.Crypto\SocketServer.Crypto.csproj">
<Project>{4138075A-49CD-4A46-92CB-DFF64A0BB0B6}</Project>
<Name>SocketServer.Crypto</Name>
</ProjectReference>
<ProjectReference Include="..\SocketServer.Messages\SocketServer.Messages.csproj">
<Project>{9394CA0C-0014-4C8B-8795-3A5C45B254EE}</Project>
<Name>SocketServer.Messages</Name>
</ProjectReference>
<ProjectReference Include="..\SocketServer.Shared\SocketServer.Shared.csproj">
<Project>{7C9013CF-CEC4-4F7D-B80D-C6FA2E243CF1}</Project>
<Name>SocketServer.Shared</Name>
</ProjectReference>
Expand Down
Binary file modified Database/ServerData.sdf
Binary file not shown.
45 changes: 0 additions & 45 deletions NewSocketServer/ChannelEventArgs.cs

This file was deleted.

Loading

0 comments on commit 3e26250

Please sign in to comment.