Support for layer 11
This commit is contained in:
parent
381c9b3247
commit
f11ae1983f
@ -229,8 +229,8 @@
|
|||||||
#define CODE_update_encrypted_messages_read 0x38fe25b7
|
#define CODE_update_encrypted_messages_read 0x38fe25b7
|
||||||
#define CODE_encrypted_chat_empty 0xab7ec0a0
|
#define CODE_encrypted_chat_empty 0xab7ec0a0
|
||||||
#define CODE_encrypted_chat_waiting 0x3bf703dc
|
#define CODE_encrypted_chat_waiting 0x3bf703dc
|
||||||
#define CODE_encrypted_chat_requested 0xfda9a7b7
|
#define CODE_encrypted_chat_requested 0xc878527e
|
||||||
#define CODE_encrypted_chat 0x6601d14f
|
#define CODE_encrypted_chat 0xfa56ce36
|
||||||
#define CODE_encrypted_chat_discarded 0x13d6dd27
|
#define CODE_encrypted_chat_discarded 0x13d6dd27
|
||||||
#define CODE_input_encrypted_chat 0xf141b5e1
|
#define CODE_input_encrypted_chat 0xf141b5e1
|
||||||
#define CODE_encrypted_file_empty 0xc21f497e
|
#define CODE_encrypted_file_empty 0xc21f497e
|
||||||
@ -258,6 +258,7 @@
|
|||||||
#define CODE_input_encrypted_file_big_uploaded 0x2dc173c8
|
#define CODE_input_encrypted_file_big_uploaded 0x2dc173c8
|
||||||
#define CODE_update_chat_participant_add 0x3a0eeb22
|
#define CODE_update_chat_participant_add 0x3a0eeb22
|
||||||
#define CODE_update_chat_participant_delete 0x6e5f8c22
|
#define CODE_update_chat_participant_delete 0x6e5f8c22
|
||||||
|
#define CODE_update_dc_options 0x8e5e9873
|
||||||
#define CODE_input_media_uploaded_audio 0x61a6d436
|
#define CODE_input_media_uploaded_audio 0x61a6d436
|
||||||
#define CODE_input_media_audio 0x89938781
|
#define CODE_input_media_audio 0x89938781
|
||||||
#define CODE_input_media_uploaded_document 0x34e794bd
|
#define CODE_input_media_uploaded_document 0x34e794bd
|
||||||
@ -377,4 +378,5 @@
|
|||||||
#define CODE_init_connection 0x69796de9
|
#define CODE_init_connection 0x69796de9
|
||||||
#define CODE_invoke_with_layer9 0x76715a63
|
#define CODE_invoke_with_layer9 0x76715a63
|
||||||
#define CODE_invoke_with_layer10 0x39620c41
|
#define CODE_invoke_with_layer10 0x39620c41
|
||||||
|
#define CODE_invoke_with_layer11 0xa6b88fdf
|
||||||
#endif
|
#endif
|
||||||
|
@ -318,7 +318,7 @@ void out_random (int n) {
|
|||||||
|
|
||||||
int allow_send_linux_version;
|
int allow_send_linux_version;
|
||||||
void do_insert_header (void) {
|
void do_insert_header (void) {
|
||||||
out_int (CODE_invoke_with_layer10);
|
out_int (CODE_invoke_with_layer11);
|
||||||
out_int (CODE_init_connection);
|
out_int (CODE_init_connection);
|
||||||
out_int (TG_APP_ID);
|
out_int (TG_APP_ID);
|
||||||
if (allow_send_linux_version) {
|
if (allow_send_linux_version) {
|
||||||
@ -2422,6 +2422,7 @@ void do_send_create_encr_chat (void *x, unsigned char *random) {
|
|||||||
int get_dh_config_on_answer (struct query *q UU) {
|
int get_dh_config_on_answer (struct query *q UU) {
|
||||||
unsigned x = fetch_int ();
|
unsigned x = fetch_int ();
|
||||||
assert (x == CODE_messages_dh_config || x == CODE_messages_dh_config_not_modified || LOG_DH_CONFIG);
|
assert (x == CODE_messages_dh_config || x == CODE_messages_dh_config_not_modified || LOG_DH_CONFIG);
|
||||||
|
logprintf ("old = %d\n", encr_param_version);
|
||||||
if (x == CODE_messages_dh_config || x == LOG_DH_CONFIG) {
|
if (x == CODE_messages_dh_config || x == LOG_DH_CONFIG) {
|
||||||
int a = fetch_int ();
|
int a = fetch_int ();
|
||||||
int l = prefetch_strlen ();
|
int l = prefetch_strlen ();
|
||||||
@ -2432,7 +2433,7 @@ int get_dh_config_on_answer (struct query *q UU) {
|
|||||||
|
|
||||||
BIGNUM *p = BN_bin2bn ((void *)s, 256, 0);
|
BIGNUM *p = BN_bin2bn ((void *)s, 256, 0);
|
||||||
assert (check_DH_params (p, a) >= 0);
|
assert (check_DH_params (p, a) >= 0);
|
||||||
BN_free (p);
|
BN_free (p);
|
||||||
}
|
}
|
||||||
if (x == LOG_DH_CONFIG) { return 0; }
|
if (x == LOG_DH_CONFIG) { return 0; }
|
||||||
int l = prefetch_strlen ();
|
int l = prefetch_strlen ();
|
||||||
|
@ -342,14 +342,14 @@ void fetch_encrypted_chat (struct secret_chat *U) {
|
|||||||
memcpy (g_key, s + (l - 256), 256);
|
memcpy (g_key, s + (l - 256), 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
l = prefetch_strlen ();
|
/*l = prefetch_strlen ();
|
||||||
s = fetch_str (l);
|
s = fetch_str (l);
|
||||||
if (l != 256) { logprintf ("l = %d\n", l); }
|
if (l != 256) { logprintf ("l = %d\n", l); }
|
||||||
if (l < 256) {
|
if (l < 256) {
|
||||||
memcpy (nonce + 256 - l, s, l);
|
memcpy (nonce + 256 - l, s, l);
|
||||||
} else {
|
} else {
|
||||||
memcpy (nonce, s + (l - 256), 256);
|
memcpy (nonce, s + (l - 256), 256);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (x == CODE_encrypted_chat) {
|
if (x == CODE_encrypted_chat) {
|
||||||
fetch_long (); // fingerprint
|
fetch_long (); // fingerprint
|
||||||
@ -393,14 +393,14 @@ void fetch_encrypted_chat (struct secret_chat *U) {
|
|||||||
memcpy (g_key, s + (l - 256), 256);
|
memcpy (g_key, s + (l - 256), 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
l = prefetch_strlen ();
|
/*l = prefetch_strlen ();
|
||||||
s = fetch_str (l);
|
s = fetch_str (l);
|
||||||
if (l != 256) { logprintf ("l = %d\n", l); }
|
if (l != 256) { logprintf ("l = %d\n", l); }
|
||||||
if (l < 256) {
|
if (l < 256) {
|
||||||
memcpy (nonce + 256 - l, s, l);
|
memcpy (nonce + 256 - l, s, l);
|
||||||
} else {
|
} else {
|
||||||
memcpy (nonce, s + (l - 256), 256);
|
memcpy (nonce, s + (l - 256), 256);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (x == CODE_encrypted_chat_requested) {
|
if (x == CODE_encrypted_chat_requested) {
|
||||||
return; // Duplicate?
|
return; // Duplicate?
|
||||||
|
Loading…
Reference in New Issue
Block a user