Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvvaltman <vvaltman@neon>2014-12-15 18:52:14 +0300
committervvaltman <vvaltman@neon>2014-12-15 18:52:14 +0300
commit70ae72b5cbe12af138609b953de6d004c01042c1 (patch)
tree4d2ebe5b5c1a913213ba2cf1161c4513f5b67dcd /binlog.c
parentbe0fb0335bf68c07202f6dd24825db65a4ea1e59 (diff)
started rewrite of mtproto-client
Diffstat (limited to 'binlog.c')
-rw-r--r--binlog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/binlog.c b/binlog.c
index 3389139..855cf02 100644
--- a/binlog.c
+++ b/binlog.c
@@ -127,10 +127,12 @@ static int fetch_comb_binlog_dc_salt (struct tgl_state *TLS, void *extra) {
}
static int fetch_comb_binlog_set_dh_params (struct tgl_state *TLS, void *extra) {
- if (TLS->encr_prime) { tfree (TLS->encr_prime, 256); }
+ if (TLS->encr_prime) { tfree (TLS->encr_prime, 256); BN_free (TLS->encr_prime_bn); }
TLS->encr_root = fetch_int ();
TLS->encr_prime = talloc (256);
fetch_ints (TLS->encr_prime, 64);
+ TLS->encr_prime_bn = BN_new ();
+ BN_bin2bn ((void *)TLS->encr_prime, 256, TLS->encr_prime_bn);
TLS->encr_param_version = fetch_int ();
return 0;