General fixes
Fixed most compiler warnings. Changed used interface from utun0/utun1 to lynx0
This commit is contained in:
@@ -66,7 +66,7 @@ int main(int argc, char** argv) {
|
||||
WintunInitialize();
|
||||
#endif
|
||||
|
||||
std::shared_ptr<VirtualInterface> tun = std::make_shared<VirtualInterface>("utun1");
|
||||
std::shared_ptr<VirtualInterface> tun = std::make_shared<VirtualInterface>("lynx0");
|
||||
log("Using virtual interface: " + tun->getName());
|
||||
|
||||
LibSodiumWrapper sodiumWrapper = LibSodiumWrapper();
|
||||
|
||||
@@ -196,7 +196,12 @@ namespace ColumnLynx::Net::TCP {
|
||||
|
||||
// Convert the server's public key to Curve25519 for encryption
|
||||
AsymPublicKey serverXPubKey{};
|
||||
crypto_sign_ed25519_pk_to_curve25519(serverXPubKey.data(), mServerPublicKey);
|
||||
int r = crypto_sign_ed25519_pk_to_curve25519(serverXPubKey.data(), mServerPublicKey);
|
||||
if (r != 0) {
|
||||
Utils::error("Failed to convert server signing key to encryption key! Killing connection.");
|
||||
disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
// Generate AES key and send confirmation
|
||||
mConnectionAESKey = Utils::LibSodiumWrapper::generateRandom256Bit();
|
||||
|
||||
Reference in New Issue
Block a user