Commit Graph

305 Commits

Author SHA1 Message Date
levlam
1b5798393d Move FloodControlGlobal to tdutils. 2022-06-09 17:12:59 +03:00
levlam
a30ac1c277 Minor improvements. 2022-06-09 16:38:38 +03:00
Arseny Smirnov
7941672e79 add some kind of global limit for concurrent hanshakes 2022-06-09 11:10:38 +02:00
Arseny Smirnov
852fe4f24b Session: force ack when we received unknown answer 2022-05-03 17:17:36 +04:00
levlam
b4fda2d45a Use FlatHashMap in mtproto and td_json_client. 2022-02-09 16:05:53 +03:00
levlam
822257b90a Resend requests on CONNECTION_NOT_INITED and CONNECTION_LAYER_INVALID errors. 2022-02-07 22:05:01 +03:00
levlam
b1b945e239 Minor fixes. 2022-01-31 15:56:44 +03:00
Arseny Smirnov
452f60be0b SequenceDispatcher: support multiple chains 2022-01-28 17:06:54 +03:00
levlam
dd1e0af5dc Keep connection header for 3 seconds after successful response. 2022-01-06 21:19:07 +03:00
KnorpelSenf
789b9c0a55 Fix much typos 2022-01-25 16:07:36 +03:00
levlam
8085779cdc Update copyright year. 2022-01-01 03:35:39 +03:00
levlam
01fccc430f Use explicit cast instead of 1ll. 2021-12-31 09:36:24 +03:00
levlam
a6c0902ad7 Silence g++ warnings. 2021-12-01 16:01:27 +03:00
levlam
746c70900b Use different timeouts for different handshake parts. 2021-11-27 22:22:51 +03:00
levlam
b731414d42 Init some fields just in case. 2021-11-11 17:39:09 +03:00
levlam
2431afc722 Add more logging for CHECK. 2021-10-24 13:23:47 +03:00
levlam
c24501f2d9 Reduce "this" usages. 2021-10-23 21:17:00 +03:00
levlam
0c1469f7c6 Fix TransparentProxy::Callback. 2021-10-22 19:59:15 +03:00
levlam
495082b628 Simplify updateChatLastMessage creation. 2021-10-22 16:41:31 +03:00
levlam
9f44816a62 Minor improvements. 2021-10-21 12:51:16 +03:00
levlam
41cc287d66 Improve checks. 2021-10-20 00:54:49 +03:00
levlam
44a186c7c1 Minor improvements. 2021-10-18 19:26:14 +03:00
levlam
81b38d5607 Mark move constructors/assignment operators noexcept. 2021-10-18 14:36:15 +03:00
levlam
f35afe23c8 Minor warning fixes. 2021-10-18 12:57:13 +03:00
levlam
61c3a2bcf5 Remove TD_EXPERIMENTAL_WATCH_OS. 2021-09-24 13:41:22 +03:00
levlam
db18baa503 Unify include order. 2021-09-19 00:47:05 +03:00
levlam
74315e2e60 Add mtproto::ConnectionManager. 2021-09-16 19:09:39 +03:00
levlam
9651243eaa Add more checks that raw_connection_ isn't nullptr. 2021-09-16 16:20:07 +03:00
levlam
075d004b9f Replace getChatThemes with updateChatThemes. 2021-09-13 15:55:01 +03:00
levlam
45ebe775c5 Optimize SessionConnection::on_slice_packet using TlDowncastHelper. 2021-09-12 19:46:12 +03:00
levlam
55e69f65af Add separate on_update callback. 2021-09-10 16:31:04 +03:00
levlam
e6799e3054 Simplify rpc_error handling. 2021-09-10 16:12:56 +03:00
levlam
641f47a81c Use switch instead of if. 2021-09-10 16:08:46 +03:00
levlam
6beaf41231 Minor improvements. 2021-09-01 20:31:39 +03:00
levlam
3749e1f672 Add warning for very old updates. 2021-08-23 00:08:05 +03:00
levlam
6507fb7602 Use array-based MessageIdDuplicateChecker. 2021-08-22 22:08:46 +03:00
levlam
b3aa31d398 Minor cut_tail improvements. 2021-08-22 13:36:47 +03:00
levlam
4a3f56e6c1 Check that updates aren't received in rpc_result. 2021-08-22 13:23:21 +03:00
levlam
7faf7aeba7 Improve logging on too old update. 2021-08-22 13:16:10 +03:00
levlam
d154399d70 Optimize MessageIdDuplicateChecker::check. 2021-08-21 22:41:06 +03:00
levlam
43d9ba81ac Prefer std::unordered_map to std::map. 2021-08-21 21:42:07 +03:00
levlam
ff02c55075 Add checks for error code and message. 2021-07-26 20:04:43 +03:00
levlam
40cb97841a Pass error message as string. 2021-07-26 19:58:31 +03:00
levlam
0b74d17f8c Don't try to continue Handshake if timeout expired. 2021-07-22 19:23:08 +03:00
levlam
7f617254f0 Move HandshakeActor methods to cpp. 2021-07-22 19:03:34 +03:00
levlam
061ca24be9 Simplify AuthKeyHandshake constructor. 2021-07-19 05:09:20 +03:00
levlam
3109848164 Delete unused AuthKeyHandshake methods. 2021-07-19 05:01:14 +03:00
levlam
1f9c6c7352 Minor improvements. 2021-07-16 18:58:11 +03:00
levlam
46aa876259 Use is_*_bad instead of is_*_ok. 2021-07-11 02:21:01 +03:00
levlam
e9e2428237 Update server keys. 2021-07-08 16:39:34 +03:00
levlam
d23064812f Simplify rsa_key usage. 2021-07-06 18:31:43 +03:00
levlam
65e96c561c Add struct RsaKey. 2021-07-05 22:09:45 +03:00
levlam
c60693cc7e Improve AuthKeyHandshake private field names. 2021-07-05 21:26:43 +03:00
levlam
040e0deb31 Move DhCallback to a separate header. 2021-07-05 21:20:07 +03:00
levlam
61664b4044 Move remaining MTProto classes to namespace mtproto. 2021-07-05 21:04:23 +03:00
levlam
4404e47f75 Use TLObjectStorer to store Handshake objects. 2021-07-05 20:38:39 +03:00
levlam
397274daf7 Remove server_DH_params_fail. 2021-07-05 19:45:31 +03:00
levlam
370d443a9d Explicitly specify inheritance mode. 2021-07-04 18:22:20 +03:00
levlam
40c5d47717 Make inherited classes final if possible. 2021-07-04 05:58:54 +03:00
levlam
edfa5d1d98 Use final instead of override. 2021-07-03 23:51:36 +03:00
levlam
bed2650b4c Fix secret chat creation. 2021-07-02 03:25:09 +03:00
levlam
8a418e9e03 Use Status::move_as_error_suffix to keep error type. 2021-06-14 01:24:15 +03:00
levlam
69cd3e9ced Improve header name. 2021-06-02 16:22:30 +03:00
levlam
1554044a84 Simplify removing packet padding. 2021-06-02 01:50:00 +03:00
levlam
9cecc116f3 Prefer US spelling of "canceled". 2021-05-31 21:51:48 +03:00
levlam
a6a4eb6616 Don't include SliceBuilder.h in logging.h. 2021-05-17 15:21:11 +03:00
levlam
4df03c8491 Clamp float numbers before conversion to integers. 2021-03-28 22:33:22 +03:00
levlam
b84318fed4 Minor improvements. 2021-03-27 05:19:22 +03:00
levlam
66de95d93c Fix compilation errors and formatting. 2021-03-26 18:52:45 +03:00
Arseny Smirnov
5c7b7d4c85 TD_EXPERIMENTAL_WATCH_OS cmake option 2021-03-26 18:04:25 +03:00
Arseny Smirnov
0c90ca3784 some cryptography draft 2021-02-10 23:25:28 +03:00
levlam
e031a2c6c1 Improve Slice::truncate usage. 2021-02-04 15:54:12 +03:00
levlam
e3cb608293 Remove was_auth flag. 2021-02-01 15:07:10 +03:00
levlam
fc2941763b Fix LibreSSL 3+ support. 2021-01-24 21:59:03 +03:00
levlam
82f0386e73 Move some functions from misc.h to algorithm.h. 2021-01-01 16:01:03 +03:00
levlam
52c1da0a70 Update copyright year. 2021-01-01 15:57:46 +03:00
levlam
3ec02f971d Update Safari's ClientHello. 2020-12-31 16:08:04 +03:00
levlam
6d6d1b20b6 Reimplement RSA for OpenSSL 3.0.0. 2020-12-22 23:29:10 +03:00
levlam
03bb56ae96 Add RSA test. 2020-12-22 22:28:04 +03:00
levlam
fdc3920572 Fix some includes.
GitOrigin-RevId: 4b57613cc6e948ceb7d63b4378bc9124271e0f53
2020-10-08 18:30:36 +03:00
levlam
d2d0cb5cc0 Move log tags definitions out of logging.cpp.
GitOrigin-RevId: 0e74b94ec194f8ee678bb77a04d35df46702b330
2020-10-05 18:07:23 +03:00
levlam
77678b730c Send acknowledgements immediately if hane many of them.
GitOrigin-RevId: e7759150942e8fcdde57b1113e5b6c0375023f91
2020-09-02 15:40:47 +03:00
levlam
c4ca04a17d Move expected logging to INFO.
GitOrigin-RevId: 4e12878c5390f6634f3a2cc6b8de5b9c3de50012
2020-08-06 20:37:19 +03:00
Arseny Smirnov
9ea1bc824f ByteFlow: backpressure draft
GitOrigin-RevId: 09adce82dd88fcf84f41e525e45b07da03acc0f6
2020-07-22 21:52:00 +03:00
Arseny Smirnov
38ef3a75cc PollableFd: explicit sync_with_poll
GitOrigin-RevId: 71fa35a594816e84e372ebcfa9d0077a13f26a62
2020-07-21 18:29:39 +03:00
levlam
c9889d1a20 Fix TLS handshake.
GitOrigin-RevId: 7542732a79c9fed971332203a620f32ce6d8f878
2020-07-15 16:38:04 +03:00
levlam
7767842d4c Minor fixes.
GitOrigin-RevId: b9f67c5e5edf818610c1739533f01a7873e6e1b6
2020-07-14 03:37:04 +03:00
levlam
e16952121b Use emplace whenever possible.
GitOrigin-RevId: 67cd8e3b6331c5e1671a9d662f034af1e29d3ac6
2020-07-13 23:20:16 +03:00
levlam
97b2191697 Update TLS ClientHello.
GitOrigin-RevId: c7555b5f569c17fa0b1600c9d4cfb6bc4310b4b5
2020-07-09 16:59:57 +03:00
levlam
0cf4fea1ff Remove enum usages for static constants creation.
GitOrigin-RevId: 2a88fd2cd961398a09403fe35a15ae56372a44f8
2020-06-15 04:52:56 +03:00
levlam
ea4841a37c Unify enum constant name style.
GitOrigin-RevId: 2e36eef9b54c23da0d1bc9beb7e07af8835f702d
2020-06-15 04:23:47 +03:00
levlam
8a118ec305 Add PingProxy actor name.
GitOrigin-RevId: b539817bad2d706df3391619cd2c81324b8dc686
2020-06-10 20:34:45 +03:00
levlam
6f885c41d9 Rename crypto to RSA.
GitOrigin-RevId: 4c15f44c0d5c618933b7c1aecb3580664a15a557
2020-05-17 17:07:16 +03:00
levlam
62863e9280 Minor fixes.
GitOrigin-RevId: e7b9ea9cb76d5c65c00a5ca86c85c6c8984e1d3c
2020-03-16 22:00:44 +03:00
levlam
aac59710b4 Move fetch_result to corresponding files.
GitOrigin-RevId: e553631e87f81f466ce8ebc353820acd82dd8510
2020-03-16 01:42:24 +03:00
levlam
d06a786a16 Simplify NetQueryCreator and remove mtproto dependency on telegram_api.
GitOrigin-RevId: 2edfc9d6d80eab8716dfd3722f6aebe53dba1e47
2020-03-16 01:01:14 +03:00
levlam
6854db1021 Remove unneeded call to ensure_const_time on a public exponent.
GitOrigin-RevId: 5b35a453851ecc4caf4c97f17d059c2dd1c81cfd
2020-03-10 18:28:25 +03:00
levlam
3e559e457c Improve names of RSA methods.
GitOrigin-RevId: b6f61f141987f282b5cf4faa9ff6cdf1219e8562
2020-03-10 18:27:43 +03:00
levlam
b7af94e2e4 Make RSA::encrypt safe.
GitOrigin-RevId: 0d83acb2f6c022af59320c3ea755257cd926cbe4
2020-02-13 03:49:59 +03:00
levlam
c99103afce Fix test.
GitOrigin-RevId: 6f2a9eec68042949d10d8a4513d176e57f603146
2020-01-30 04:06:15 +03:00