diff --git a/server/src/client/voice/CryptSetupHandler.cpp b/server/src/client/voice/CryptSetupHandler.cpp index add0a34..ac80652 100644 --- a/server/src/client/voice/CryptSetupHandler.cpp +++ b/server/src/client/voice/CryptSetupHandler.cpp @@ -242,6 +242,10 @@ CryptSetupHandler::CommandResult CryptSetupHandler::handleCommandClientInitIv(co CryptSetupHandler::CommandResult CryptSetupHandler::handleCommandClientEk(const ts::command_parser &cmd) { debugMessage(this->connection->virtual_server_id(), "{} Got client ek!", this->connection->log_prefix()); + if(!this->chain_data || !this->chain_data->chain) { + return ts::command_result{error::vs_critical, "missing chain data"}; + } + auto client_key = base64::decode(cmd.value("ek")); auto private_key = this->chain_data->chain->generatePrivateKey(this->chain_data->root_key, this->chain_data->root_index);