ProtoProxy: Renamed PublicKey to CryptoKey.
This commit is contained in:
parent
d9e5dbf165
commit
3e854bc596
@ -38,9 +38,9 @@ set(SHARED_SRC
|
|||||||
../../src/MCLogger.cpp
|
../../src/MCLogger.cpp
|
||||||
../../src/PolarSSL++/AesCfb128Decryptor.cpp
|
../../src/PolarSSL++/AesCfb128Decryptor.cpp
|
||||||
../../src/PolarSSL++/AesCfb128Encryptor.cpp
|
../../src/PolarSSL++/AesCfb128Encryptor.cpp
|
||||||
|
../../src/PolarSSL++/CryptoKey.cpp
|
||||||
../../src/PolarSSL++/CtrDrbgContext.cpp
|
../../src/PolarSSL++/CtrDrbgContext.cpp
|
||||||
../../src/PolarSSL++/EntropyContext.cpp
|
../../src/PolarSSL++/EntropyContext.cpp
|
||||||
../../src/PolarSSL++/PublicKey.cpp
|
|
||||||
../../src/PolarSSL++/RsaPrivateKey.cpp
|
../../src/PolarSSL++/RsaPrivateKey.cpp
|
||||||
)
|
)
|
||||||
set(SHARED_HDR
|
set(SHARED_HDR
|
||||||
@ -50,9 +50,9 @@ set(SHARED_HDR
|
|||||||
../../src/MCLogger.h
|
../../src/MCLogger.h
|
||||||
../../src/PolarSSL++/AesCfb128Decryptor.h
|
../../src/PolarSSL++/AesCfb128Decryptor.h
|
||||||
../../src/PolarSSL++/AesCfb128Encryptor.h
|
../../src/PolarSSL++/AesCfb128Encryptor.h
|
||||||
|
../../src/PolarSSL++/CryptoKey.h
|
||||||
../../src/PolarSSL++/CtrDrbgContext.h
|
../../src/PolarSSL++/CtrDrbgContext.h
|
||||||
../../src/PolarSSL++/EntropyContext.h
|
../../src/PolarSSL++/EntropyContext.h
|
||||||
../../src/PolarSSL++/PublicKey.h
|
|
||||||
../../src/PolarSSL++/RsaPrivateKey.h
|
../../src/PolarSSL++/RsaPrivateKey.h
|
||||||
)
|
)
|
||||||
set(SHARED_OSS_SRC
|
set(SHARED_OSS_SRC
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "Connection.h"
|
#include "Connection.h"
|
||||||
#include "Server.h"
|
#include "Server.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "PolarSSL++/PublicKey.h"
|
#include "PolarSSL++/CryptoKey.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <direct.h> // For _mkdir()
|
#include <direct.h> // For _mkdir()
|
||||||
@ -2900,7 +2900,7 @@ void cConnection::SendEncryptionKeyResponse(const AString & a_ServerPublicKey, c
|
|||||||
Byte SharedSecret[16];
|
Byte SharedSecret[16];
|
||||||
Byte EncryptedSecret[128];
|
Byte EncryptedSecret[128];
|
||||||
memset(SharedSecret, 0, sizeof(SharedSecret)); // Use all zeroes for the initial secret
|
memset(SharedSecret, 0, sizeof(SharedSecret)); // Use all zeroes for the initial secret
|
||||||
cPublicKey PubKey(a_ServerPublicKey);
|
cCryptoKey PubKey(a_ServerPublicKey);
|
||||||
int res = PubKey.Encrypt(SharedSecret, sizeof(SharedSecret), EncryptedSecret, sizeof(EncryptedSecret));
|
int res = PubKey.Encrypt(SharedSecret, sizeof(SharedSecret), EncryptedSecret, sizeof(EncryptedSecret));
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user