bugfix
GitOrigin-RevId: 05d77fed7ce13cdf2a630f49733e9fe9bd949e3f
This commit is contained in:
parent
14cc4e43fe
commit
61206293fe
@ -378,8 +378,8 @@ Status TlsInit::wait_hello_response() {
|
|||||||
auto response_rand_slice = response.as_slice().substr(11, 32);
|
auto response_rand_slice = response.as_slice().substr(11, 32);
|
||||||
auto response_rand = response_rand_slice.str();
|
auto response_rand = response_rand_slice.str();
|
||||||
std::fill(response_rand_slice.begin(), response_rand_slice.end(), '\0');
|
std::fill(response_rand_slice.begin(), response_rand_slice.end(), '\0');
|
||||||
std::string hash_dest(32, '\0');
|
std::string hash_dest(32, 0);
|
||||||
hmac_sha256(password_, PSLICE() << hello_rand_ << response_rand_slice, hash_dest);
|
hmac_sha256(password_, PSLICE() << hello_rand_ << response_rand, hash_dest);
|
||||||
if (hash_dest != response_rand) {
|
if (hash_dest != response_rand) {
|
||||||
return td::Status::Error("response hash mismatch");
|
return td::Status::Error("response hash mismatch");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user