diff --git a/native/serverconnection/src/connection/ProtocolHandler.cpp b/native/serverconnection/src/connection/ProtocolHandler.cpp index e05272b..eadebb2 100644 --- a/native/serverconnection/src/connection/ProtocolHandler.cpp +++ b/native/serverconnection/src/connection/ProtocolHandler.cpp @@ -444,6 +444,7 @@ bool ProtocolHandler::create_datagram_packets(std::vector &result } else { packet->applyPacketId(this->_packet_id_manager); } + log_trace(category::connection, tr("Packet {} got packet id {}"), packet->type().name(), packet->packetId()); } if(!this->crypt_handler.progressPacketOut(packet.get(), error, false)) { log_error(category::connection, tr("Failed to encrypt packet: {}"), error); diff --git a/native/serverconnection/src/connection/ProtocolHandlerCrypto.cpp b/native/serverconnection/src/connection/ProtocolHandlerCrypto.cpp index b5730d3..1d76880 100644 --- a/native/serverconnection/src/connection/ProtocolHandlerCrypto.cpp +++ b/native/serverconnection/src/connection/ProtocolHandlerCrypto.cpp @@ -47,7 +47,7 @@ std::string ProtocolHandler::generate_client_initiv() { if(result == CRYPT_OK) command["omega"] = base64::encode(buffer, buffer_length); else - cout << "Failed to export identity (" << result << ")" << endl; + log_error(category::connection, tr("Failed to export identiry ({})"), result); } this->crypto.initiv_command = command.build(true); @@ -173,8 +173,9 @@ void ProtocolHandler::handleCommandInitIVExpend2(ts::Command &cmd) { auto server_public_key = crypto_chain->generatePublicKey(*(license::teamspeak::LicensePublicKey*) crypto_root.data()); crypto_chain->print(); - u_char seed[32 * 2]; //FIXME more secure - u_char public_key[32], private_key[32]; + u_char seed[32]; + ed25519_create_seed(seed); + u_char public_key[32], private_key[64]; /* We need 64 bytes because we're doing some SHA512 actions */ ed25519_create_keypair(public_key, private_key, seed); /* send clientek response */ diff --git a/package.json b/package.json index b581b23..4896fbc 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "crash_handler": "electron . crash-handler", "test": "echo \"Error: no test specified\" && exit 1", "start": "electron --js-flags='--expose-gc' --debug --dev-tools --disable-hardware-acceleration .", - "start-d": "electron . --debug -t -su http://dev.clientapi.teaspeak.de/", + "start-d": "electron . --debug -t --gdb -su http://dev.clientapi.teaspeak.de/", "start-n": "electron . -t --no-single-instance -su http://null.teaspeak.de/", "start-01": "electron . --updater-channel=test -u=http://dev.clientapi.teaspeak.de/ -d --updater-ui-loader_type=0 --updater-local-version=1.0.1", "compile-sass": "sass --update .:.",