Updating the deploy algorithm
This commit is contained in:
@@ -35,7 +35,7 @@ command_result SpeakingClient::handleCommandHandshakeBegin(Command& cmd) { //If
|
||||
if(authenticationMethod == IdentityType::TEAMSPEAK) {
|
||||
this->handshake.identityType = IdentityType::TEAMSPEAK;
|
||||
|
||||
auto identity = base64::decode(cmd["publicKey"]);
|
||||
auto identity = base64::decode(cmd["publicKey"].string());
|
||||
this->properties()[property::CLIENT_UNIQUE_IDENTIFIER] = base64::encode(digest::sha1(cmd["publicKey"].string()));
|
||||
|
||||
this->handshake.identityKey = shared_ptr<ecc_key>(new ecc_key{}, free_ecc);
|
||||
@@ -144,7 +144,7 @@ command_result SpeakingClient::handleCommandHandshakeIdentityProof(Command& cmd)
|
||||
this->properties()[property::CLIENT_TEAFORO_NAME] = (*this->handshake.identityData)["user_name"].asString();
|
||||
this->handshake.state = HandshakeState::SUCCEEDED;
|
||||
} else if(this->handshake.identityType == IdentityType::TEAMSPEAK) {
|
||||
auto proof = base64::decode(cmd["proof"]);
|
||||
auto proof = base64::decode(cmd["proof"].string());
|
||||
|
||||
int result;
|
||||
if(ecc_verify_hash((u_char*) proof.data(), proof.length(), (u_char*) this->handshake.proof_message.data(), this->handshake.proof_message.length(), &result, this->handshake.identityKey.get()) != CRYPT_OK)
|
||||
|
||||
Reference in New Issue
Block a user