Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
f11ae198
Commit
f11ae198
authored
Dec 24, 2013
by
vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for layer 11
parent
381c9b32
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
constants.h
constants.h
+4
-2
queries.c
queries.c
+3
-2
structures.c
structures.c
+4
-4
No files found.
constants.h
View file @
f11ae198
...
...
@@ -229,8 +229,8 @@
#define CODE_update_encrypted_messages_read 0x38fe25b7
#define CODE_encrypted_chat_empty 0xab7ec0a0
#define CODE_encrypted_chat_waiting 0x3bf703dc
#define CODE_encrypted_chat_requested 0x
fda9a7b7
#define CODE_encrypted_chat 0x
6601d14f
#define CODE_encrypted_chat_requested 0x
c878527e
#define CODE_encrypted_chat 0x
fa56ce36
#define CODE_encrypted_chat_discarded 0x13d6dd27
#define CODE_input_encrypted_chat 0xf141b5e1
#define CODE_encrypted_file_empty 0xc21f497e
...
...
@@ -258,6 +258,7 @@
#define CODE_input_encrypted_file_big_uploaded 0x2dc173c8
#define CODE_update_chat_participant_add 0x3a0eeb22
#define CODE_update_chat_participant_delete 0x6e5f8c22
#define CODE_update_dc_options 0x8e5e9873
#define CODE_input_media_uploaded_audio 0x61a6d436
#define CODE_input_media_audio 0x89938781
#define CODE_input_media_uploaded_document 0x34e794bd
...
...
@@ -377,4 +378,5 @@
#define CODE_init_connection 0x69796de9
#define CODE_invoke_with_layer9 0x76715a63
#define CODE_invoke_with_layer10 0x39620c41
#define CODE_invoke_with_layer11 0xa6b88fdf
#endif
queries.c
View file @
f11ae198
...
...
@@ -318,7 +318,7 @@ void out_random (int n) {
int
allow_send_linux_version
;
void
do_insert_header
(
void
)
{
out_int
(
CODE_invoke_with_layer1
0
);
out_int
(
CODE_invoke_with_layer1
1
);
out_int
(
CODE_init_connection
);
out_int
(
TG_APP_ID
);
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
)
{
unsigned
x
=
fetch_int
();
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
)
{
int
a
=
fetch_int
();
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
);
assert
(
check_DH_params
(
p
,
a
)
>=
0
);
BN_free
(
p
);
BN_free
(
p
);
}
if
(
x
==
LOG_DH_CONFIG
)
{
return
0
;
}
int
l
=
prefetch_strlen
();
...
...
structures.c
View file @
f11ae198
...
...
@@ -342,14 +342,14 @@ void fetch_encrypted_chat (struct secret_chat *U) {
memcpy
(
g_key
,
s
+
(
l
-
256
),
256
);
}
l
=
prefetch_strlen
();
/*
l = prefetch_strlen ();
s = fetch_str (l);
if (l != 256) { logprintf ("l = %d\n", l); }
if (l < 256) {
memcpy (nonce + 256 - l, s, l);
} else {
memcpy (nonce, s + (l - 256), 256);
}
}
*/
if
(
x
==
CODE_encrypted_chat
)
{
fetch_long
();
// fingerprint
...
...
@@ -393,14 +393,14 @@ void fetch_encrypted_chat (struct secret_chat *U) {
memcpy
(
g_key
,
s
+
(
l
-
256
),
256
);
}
l
=
prefetch_strlen
();
/*
l = prefetch_strlen ();
s = fetch_str (l);
if (l != 256) { logprintf ("l = %d\n", l); }
if (l < 256) {
memcpy (nonce + 256 - l, s, l);
} else {
memcpy (nonce, s + (l - 256), 256);
}
}
*/
if
(
x
==
CODE_encrypted_chat_requested
)
{
return
;
// Duplicate?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment