moved temp hard coded key out of crypto class.
This commit is contained in:
parent
b2746bc1b2
commit
323285a931
|
@ -36,6 +36,10 @@
|
||||||
#include "IPlatformScreen.h"
|
#include "IPlatformScreen.h"
|
||||||
#include "CCryptoStream.h"
|
#include "CCryptoStream.h"
|
||||||
|
|
||||||
|
// TODO: these are just for testing -- make sure they're gone by release!
|
||||||
|
const byte g_key[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
||||||
|
const byte g_iv[] = "aaaaaaaaaaaaaaa";
|
||||||
|
|
||||||
//
|
//
|
||||||
// CClient
|
// CClient
|
||||||
//
|
//
|
||||||
|
@ -149,7 +153,9 @@ CClient::connect()
|
||||||
m_stream = new CPacketStreamFilter(m_stream, true);
|
m_stream = new CPacketStreamFilter(m_stream, true);
|
||||||
|
|
||||||
if (s_cryptoEnabled) {
|
if (s_cryptoEnabled) {
|
||||||
m_stream = new CCryptoStream(*EVENTQUEUE, m_stream, true);
|
CCryptoStream* cryptoStream = new CCryptoStream(*EVENTQUEUE, m_stream, true);
|
||||||
|
cryptoStream->setKeyWithIV(g_key, sizeof(g_key), g_iv);
|
||||||
|
m_stream = cryptoStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect
|
// connect
|
||||||
|
|
|
@ -30,6 +30,10 @@
|
||||||
#include "TMethodEventJob.h"
|
#include "TMethodEventJob.h"
|
||||||
#include "CCryptoStream.h"
|
#include "CCryptoStream.h"
|
||||||
|
|
||||||
|
// TODO: these are just for testing -- make sure they're gone by release!
|
||||||
|
const byte g_key[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
||||||
|
const byte g_iv[] = "aaaaaaaaaaaaaaa";
|
||||||
|
|
||||||
//
|
//
|
||||||
// CClientListener
|
// CClientListener
|
||||||
//
|
//
|
||||||
|
@ -146,7 +150,9 @@ CClientListener::handleClientConnecting(const CEvent&, void*)
|
||||||
stream = new CPacketStreamFilter(stream, true);
|
stream = new CPacketStreamFilter(stream, true);
|
||||||
|
|
||||||
if (s_cryptoEnabled) {
|
if (s_cryptoEnabled) {
|
||||||
stream = new CCryptoStream(*EVENTQUEUE, stream, true);
|
CCryptoStream* cryptoStream = new CCryptoStream(*EVENTQUEUE, stream, true);
|
||||||
|
cryptoStream->setKeyWithIV(g_key, sizeof(g_key), g_iv);
|
||||||
|
stream = cryptoStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(m_server != NULL);
|
assert(m_server != NULL);
|
||||||
|
|
|
@ -20,12 +20,6 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// TODO: these are just for testing -- make sure they're gone by release!
|
|
||||||
const byte g_key1[] = "aaaaaaaaaaaaaaa";
|
|
||||||
const byte g_key2[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
|
||||||
const byte g_iv1[] = "aaaaaaaaaaaaaaa";
|
|
||||||
const byte g_iv2[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
|
||||||
|
|
||||||
using namespace CryptoPP;
|
using namespace CryptoPP;
|
||||||
|
|
||||||
CCryptoStream::CCryptoStream(IEventQueue& eventQueue, synergy::IStream* stream, bool adoptStream) :
|
CCryptoStream::CCryptoStream(IEventQueue& eventQueue, synergy::IStream* stream, bool adoptStream) :
|
||||||
|
|
Loading…
Reference in New Issue