Fixed a crash

This commit is contained in:
WolverinDEV 2020-08-22 21:57:53 +02:00
parent 4a7a9e7228
commit add439de00
1 changed files with 4 additions and 0 deletions

View File

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