deleted old home brew crypto #4313

This commit is contained in:
XinyuHou
2015-02-11 11:12:54 +00:00
parent 4fcec1d217
commit 80343c41eb
53 changed files with 352 additions and 1902 deletions

View File

@@ -30,7 +30,6 @@
#include "synergy/FileChunker.h"
#include "synergy/IPlatformScreen.h"
#include "mt/Thread.h"
#include "io/CryptoStream.h"
#include "net/TCPSocket.h"
#include "net/IDataSocket.h"
#include "net/ISocketFactory.h"
@@ -61,7 +60,6 @@ Client::Client(
const String& name, const NetworkAddress& address,
ISocketFactory* socketFactory,
synergy::Screen* screen,
const CryptoOptions& crypto,
bool enableDragDrop) :
m_mock(false),
m_name(name),
@@ -76,8 +74,6 @@ Client::Client(
m_suspended(false),
m_connectOnResume(false),
m_events(events),
m_cryptoStream(NULL),
m_crypto(crypto),
m_sendFileThread(NULL),
m_writeToDropDirThread(NULL),
m_enableDragDrop(enableDragDrop),
@@ -165,12 +161,6 @@ Client::connect()
bool adopt = !m_useSecureNetwork;
m_stream = new PacketStreamFilter(m_events, m_stream, adopt);
if (m_crypto.m_mode != kDisabled) {
m_cryptoStream = new CryptoStream(
m_events, m_stream, m_crypto, true);
m_stream = m_cryptoStream;
}
// connect
LOG((CLOG_DEBUG1 "connecting to server"));
setupConnecting();
@@ -211,14 +201,6 @@ Client::handshakeComplete()
sendEvent(m_events->forClient().connected(), NULL);
}
void
Client::setDecryptIv(const UInt8* iv)
{
if (m_cryptoStream != NULL) {
m_cryptoStream->setDecryptIv(iv);
}
}
bool
Client::isConnected() const
{

View File

@@ -24,7 +24,6 @@
#include "synergy/DragInformation.h"
#include "synergy/INode.h"
#include "net/NetworkAddress.h"
#include "io/CryptoOptions.h"
#include "base/EventTypes.h"
class EventQueueTimer;
@@ -34,7 +33,6 @@ class IDataSocket;
class ISocketFactory;
namespace synergy { class IStream; }
class IEventQueue;
class CryptoStream;
class Thread;
class TCPSocket;
@@ -61,7 +59,6 @@ public:
const String& name, const NetworkAddress& address,
ISocketFactory* socketFactory,
synergy::Screen* screen,
const CryptoOptions& crypto,
bool enableDragDrop);
~Client();
@@ -91,9 +88,6 @@ public:
*/
virtual void handshakeComplete();
//! Set crypto IV for decryption
virtual void setDecryptIv(const UInt8* iv);
//! Clears the file buffer
void clearReceivedFileData();
@@ -223,8 +217,6 @@ private:
IClipboard::Time m_timeClipboard[kClipboardEnd];
String m_dataClipboard[kClipboardEnd];
IEventQueue* m_events;
CryptoStream* m_cryptoStream;
CryptoOptions m_crypto;
std::size_t m_expectedFileSize;
String m_receivedFileData;
DragFileList m_dragFileList;

View File

@@ -24,7 +24,6 @@
#include "synergy/option_types.h"
#include "synergy/protocol_types.h"
#include "io/IStream.h"
#include "io/CryptoStream.h"
#include "base/Log.h"
#include "base/IEventQueue.h"
#include "base/TMethodEventJob.h"
@@ -295,10 +294,6 @@ ServerProxy::parseMessage(const UInt8* code)
setOptions();
}
else if (memcmp(code, kMsgDCryptoIv, 4) == 0) {
cryptoIv();
}
else if (memcmp(code, kMsgDFileTransfer, 4) == 0) {
fileChunkReceived();
}
@@ -763,18 +758,6 @@ ServerProxy::mouseWheel()
m_client->mouseWheel(xDelta, yDelta);
}
void
ServerProxy::cryptoIv()
{
// parse
String s;
ProtocolUtil::readf(m_stream, kMsgDCryptoIv + 4, &s);
LOG((CLOG_DEBUG2 "recv crypto iv size=%i", s.size()));
// forward
m_client->setDecryptIv(reinterpret_cast<const UInt8*>(s.c_str()));
}
void
ServerProxy::screensaver()
{

View File

@@ -99,7 +99,6 @@ private:
void mouseMove();
void mouseRelativeMove();
void mouseWheel();
void cryptoIv();
void screensaver();
void resetOptions();
void setOptions();