2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Apply all MTP Key generation checks to calls.

Also move all OpenSSL BN_* calls to base/openssl_help header.
This commit is contained in:
John Preston
2017-04-24 15:16:38 +03:00
parent 4925af69e2
commit b267957abe
13 changed files with 446 additions and 403 deletions

View File

@@ -63,7 +63,7 @@ void Instance::refreshDhConfig() {
switch (result.type()) {
case mtpc_messages_dhConfig: {
auto &config = result.c_messages_dhConfig();
if (!MTP::IsPrimeAndGood(config.vp.v, config.vg.v)) {
if (!MTP::IsPrimeAndGood(bytesFromMTP(config.vp), config.vg.v)) {
LOG(("API Error: bad p/g received in dhConfig."));
callFailed(call.get());
return;