General fixes

Fixed most compiler warnings. Changed used interface from utun0/utun1 to lynx0
This commit is contained in:
2025-11-27 18:43:09 +01:00
parent d2242ebbc7
commit 2a2deae022
10 changed files with 63 additions and 28 deletions

View File

@@ -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();