diff options
author | vvaltman <vvaltman@neon> | 2014-12-15 18:52:14 +0300 |
---|---|---|
committer | vvaltman <vvaltman@neon> | 2014-12-15 18:52:14 +0300 |
commit | 70ae72b5cbe12af138609b953de6d004c01042c1 (patch) | |
tree | 4d2ebe5b5c1a913213ba2cf1161c4513f5b67dcd /binlog.c | |
parent | be0fb0335bf68c07202f6dd24825db65a4ea1e59 (diff) |
started rewrite of mtproto-client
Diffstat (limited to 'binlog.c')
-rw-r--r-- | binlog.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |