Commit Graph

181 Commits

Author SHA1 Message Date
Arseny Smirnov
5a032743e6 Fix errors from tdutils import
GitOrigin-RevId: 3709df12a3050cf05e2bb482b49490a4e874f075
2019-08-12 16:53:17 +03:00
Arseny Smirnov
c2c32c4e2b Session: fix key deletion in http connections
GitOrigin-RevId: ddc80efe78a0a11dee7eb21c55d7efdd76a2be1d
2019-08-01 16:03:18 +03:00
levlam
f432abcce4 Use copy_from instead of memcoy if possible.
GitOrigin-RevId: 63981da8864d16ce46bca4b9580e7d9613c837c5
2019-07-27 01:27:22 +03:00
levlam
cf329420db Mtproto: move KDF to separate files.
GitOrigin-RevId: 5f57db386ccc90692180a34b84387ffd46d5f311
2019-07-27 00:39:39 +03:00
levlam
38e4310b71 Remove standalone Sha256State functions.
GitOrigin-RevId: 5db80ea1902a6fe8a635081a8b050a19528f9f90
2019-07-23 03:50:03 +03:00
levlam
4ee295a29e Use Sha256State directly.
GitOrigin-RevId: 4fbbafbd14c43a551e9c24de65a6feed2b44b09e
2019-07-23 03:20:11 +03:00
levlam
98b8929932 Fix includes.
GitOrigin-RevId: 7b62de39f2d62ac8c14c24fb83041c717ba49873
2019-07-23 01:50:12 +03:00
levlam
4a2b76e1ef Fix testProxy.
GitOrigin-RevId: fcce1611113bec089ac3ca20df56eba85895a753
2019-07-23 01:13:20 +03:00
Arseny Smirnov
dfe761738f testProxy: fix HandshakeActor errors handling
GitOrigin-RevId: 4a80a500c84302d2bef699a7d49a496d4f07945a
2019-07-22 14:22:31 +03:00
levlam
feb2beeec0 Fix testProxy.
GitOrigin-RevId: 6ad0bf0e7685ccae35931c4949ba29bafbcc6335
2019-07-22 05:04:18 +03:00
levlam
0481329037 Better choice of first bytes.
GitOrigin-RevId: 7855a68ec4b1e9c43371bd29cbf6766009f45ac2
2019-07-20 01:49:22 +03:00
levlam
19b6aeeb93 Update check for TLS-proxy secret.
GitOrigin-RevId: 4ea3040f2db8da91baecd0a814933cd9cc4ccf2e
2019-07-11 23:42:59 +03:00
levlam
64517c9165 Fix checks for additional data at the end.
GitOrigin-RevId: 66067600bec585ad2c310c7adc263a5e88232653
2019-07-11 03:12:27 +03:00
levlam
b9e5ebd222 Minor improvements.
GitOrigin-RevId: 684fd2527c31f6fdbc816a2addd64e4740f8a15b
2019-07-09 06:56:06 +03:00
levlam
7958916080 Add strongly typed ProxySecret class.
GitOrigin-RevId: dbde277c6cce57fd6ff51b2e310dab95e60b38c1
2019-07-09 05:01:12 +03:00
Arseny Smirnov
e9a7dd637d TlsInit: use server_time_difference
GitOrigin-RevId: 03d93412b660be3a968a4963fb28abafe068a58d
2019-07-04 15:14:11 +02:00
Arseny Smirnov
13627727ef Mtproto: use non-deterministic padding scheme
GitOrigin-RevId: 3f6ab9ed7b9bbc8ad3ddfabe7d324175cb7e6d49
2019-07-04 12:56:10 +02:00
levlam
b8e8f337c2 Minor TlsInit improvements.
GitOrigin-RevId: 59619af2a0059a85bbdeab2775ed3805dd3ab818
2019-07-03 02:50:19 +03:00
Arseny Smirnov
ef595735b4 bugfix
GitOrigin-RevId: c582a3dea47233610427cc74e1c26e15b417288e
2019-07-02 17:49:21 +02:00
Arseny Smirnov
8a4402e0b1 bufix
GitOrigin-RevId: deeb8146386c0f5aedba7fca70a061fc5341e669
2019-07-02 17:34:27 +02:00
Arseny Smirnov
61206293fe bugfix
GitOrigin-RevId: 05d77fed7ce13cdf2a630f49733e9fe9bd949e3f
2019-07-02 17:27:34 +02:00
levlam
14cc4e43fe Fix warning.
GitOrigin-RevId: b0e7cb4a0906dd75fd87ade7a16dc8e697f0e5af
2019-07-02 18:25:02 +03:00
Arseny Smirnov
23e27a223f TlsInit: check hash in server response
GitOrigin-RevId: 00d0b679020173be7ef8e06db3bc4e64a61d3fbf
2019-07-02 17:14:13 +02:00
levlam
ef3cf44240 Change max TLS packet length.
GitOrigin-RevId: 00f896d94fa434fa867f6df5c910bbe0cf96d5ee
2019-07-02 01:58:01 +03:00
levlam
3a2bb833ec Fix TlsReaderByteFlow.
GitOrigin-RevId: 8a7dfc63a176d0c054e434904784d92467ddcba8
2019-07-01 17:37:31 +03:00
Arseny Smirnov
6d6bffaa7b ObfuscatedTransport: bugfix - send header inside of the first tls packet
GitOrigin-RevId: 5fb3eb0acee44aa1db4d943e99ddd19a1e005c44
2019-07-01 15:34:39 +02:00
levlam
0a1fb007d9 TlsInit fixes.
GitOrigin-RevId: 798d053d68b6e0955b6e0e0c7c8d36592f76c987
2019-07-01 16:18:28 +03:00
levlam
da4dd220b8 Minor fixes.
GitOrigin-RevId: cbbb78a28570618e5a5c2c04625297678d5ac8cc
2019-06-26 23:27:37 +03:00
Arseny Smirnov
9289b61b92 ConnectionCreator: use tls init
GitOrigin-RevId: f58530975f30e5341e250478c3f83cabf8947b71
2019-06-26 17:27:19 +02:00
Arseny Smirnov
795bf65f8d TlsInit.{cpp,h}
GitOrigin-RevId: acc8f3fd672382392ea9bd82e8426700aec34c04
2019-06-26 16:13:07 +02:00
Arseny Smirnov
345f28330c ObfuscatedTransport: support of emulated_tls flag
GitOrigin-RevId: f0ae7ddb21455d4e8d8c3f486744b1b9643bf2d5
2019-06-26 15:51:48 +02:00
levlam
4f9887b4bd Minor logging impprovements.
GitOrigin-RevId: 54f2abbd0be6d3ee5cd88ac75f14a660c0201359
2019-05-13 19:34:23 +03:00
Arseny Smirnov
2ab9393a1d PingConnectionPingPong: bugfix
GitOrigin-RevId: 8280963e1bb8e817d9502cbaeecf89064a7c8f2c
2019-06-04 18:52:26 +03:00
levlam
34fcde6827 Minor fixes.
GitOrigin-RevId: a5d8a4b0b9b9c4e858d7a9a7403bef0de7e009e0
2019-05-22 21:17:24 +03:00
Arseny Smirnov
11b0da92fe Reuse session_id for pings
GitOrigin-RevId: 39ddb1f925fa05f939a3965300334d5f250550ae
2019-05-10 18:27:18 +02:00
Arseny Smirnov
c99a76f422 Handle -404 error in new ping
GitOrigin-RevId: 3cf88082f0fac9cb82027899c9d276e2d6c439fe
2019-05-09 21:57:35 +02:00
Arseny Smirnov
3f4b29bfaf Calculate rtt in new Ping
GitOrigin-RevId: 9d4ef780ac99ea6c1331dc4e93014657a27f7848
2019-05-09 20:13:40 +02:00
Arseny Smirnov
ef4f719563 Use Ping with mtproto_api::ping if possible
GitOrigin-RevId: fa80dc2a2c44e416bcb50b76ba2bc64de91f8de8
2019-05-06 20:53:39 +02:00
Arseny Smirnov
be006f6cb4 mtproto::Ping two variants with mtproto_api::ping and mtproto_api::req_pq
GitOrigin-RevId: 196d7af132a791615c867cbdbfa23a2fa48327e9
2019-05-06 18:59:49 +02:00
levlam
16a209cef0 Use some unused Status responses.
GitOrigin-RevId: b49d15a22918169b5e1a212e5858dc2e9bd2033e
2019-04-28 15:00:06 +03:00
levlam
295878b217 Check connection aliveness after push is received.
GitOrigin-RevId: 526a06642617ada66ef6d84f5858cb332f1c1406
2019-03-31 22:29:34 +03:00
levlam
376fda96d5 Fix SIGSEGV.
GitOrigin-RevId: 422a9080eaf83c0c35f90ec5044f2833de9837b9
2019-03-13 04:00:45 +03:00
levlam
58f63d36d6 Fix includes.
GitOrigin-RevId: d633dc842591cd28a03f9fba6974a171926ed229
2019-02-22 23:15:43 +03:00
levlam
4d5fb2902c Unify names of ParserT/StorerT classes.
GitOrigin-RevId: 69df5062e20cc87c0778e1b125ab46575c365377
2019-02-21 20:54:20 +03:00
levlam
93494cf048 Fix log messages style.
GitOrigin-RevId: f99e2e838220826d3dea7fdc33c43ac9918a5efd
2019-02-21 18:58:20 +03:00
levlam
ce7c9feef1 Minor.
GitOrigin-RevId: dce97d9fae9b22ea19385cd73ab914a19d9b03f6
2019-02-13 00:47:48 +03:00
levlam
9b42166c68 Explicitly include common.h.
GitOrigin-RevId: 5ae32c18d0ff18aac36334b494ea526ce7da4a9a
2019-02-13 00:26:36 +03:00
levlam
eb9ead582f Remove unneded includes of td/utils/loggging.h.
GitOrigin-RevId: 82a3b506dba5c9d5267dc0e2504a7093a7fa87db
2019-02-12 23:48:16 +03:00
Arseny Smirnov
20bfcaa979 Use LOG_CHECK where it is necessary
GitOrigin-RevId: a8bd17cc2ee6e43dcea52bb25aef9ee1f91c7ec4
2019-02-12 19:17:20 +03:00
levlam
130b49a524 Various include and other fixes.
GitOrigin-RevId: 68e03e0636cd4cff3e6fa876342ba16453630f15
2019-02-12 19:48:52 +03:00
levlam
0075f91e2e Unify spelling of "expires_".
GitOrigin-RevId: 46aaff38317dd490f9d5a1250e426d94cb8aba75
2019-02-10 03:45:15 +03:00
levlam
7d28b73f5e Move DhHandshake to DhHandshake.{cpp,h}.
GitOrigin-RevId: b34d9ae18e2106d3843223bc8609f5a89b6568f6
2019-01-31 14:26:06 +03:00
levlam
5e2a71d8fb Add Query.h.
GitOrigin-RevId: f795d804e9d3feb4f72517dc84bd13bfe7955bc4
2019-01-31 05:37:59 +03:00
levlam
e0765a3c82 Move structs definition to cpp.
GitOrigin-RevId: 49480b9592e9ac58311684d2e6638011b9149e9b
2019-01-31 05:27:21 +03:00
levlam
534eab1912 Add PacketInfo.h.
GitOrigin-RevId: 76db525e427aaa8afc0f64473743dffaffdd89be
2019-01-31 05:23:40 +03:00
levlam
b9fc33b7d1 Add TransportType.h.
GitOrigin-RevId: 403b10f5dcc161be411710749c70734cf9a4fc62
2019-01-31 05:13:59 +03:00
levlam
7542612098 Fix some includes.
GitOrigin-RevId: 47d6bcd57e12314cc46c8f23ef10c10cea04fdcb
2019-01-31 05:05:40 +03:00
Arseny Smirnov
b481ce8465 NotificationManager: decrypt_push
GitOrigin-RevId: 9f623bf065d54f402ca824d40e0515111330b7a7
2019-01-29 19:16:52 +04:00
levlam
f89dbc8148 Make session_id private.
GitOrigin-RevId: c9a942a691a6bc8974d02f0cd0cc0f916c679d61
2019-02-04 18:44:29 +03:00
levlam
eaebfad034 Update copyright year.
GitOrigin-RevId: 359e2b43322222922c44c430d3814b0a4c778dc6
2019-01-01 01:02:34 +03:00
levlam
ca1503c22f Fix some includes.
GitOrigin-RevId: a57e47e5925fe1e96080945d40641c84b4e30669
2018-12-27 22:24:44 +03:00
levlam
e2d1a71d3b Improve as<>.
GitOrigin-RevId: 227b2bae3079bed93936db16c4846c8d0a49bd39
2018-12-20 01:46:55 +03:00
levlam
3850a4da7f Move as from common.h to as.h.
GitOrigin-RevId: 3ecc4b4c4ff6c9b070d30cf017e22a8acce0af09
2018-12-20 00:57:56 +03:00
levlam
b676fe509a Move UInt to UInt.h
GitOrigin-RevId: 52b6d36d1ece8c267f5548000b2592ffd3a62ded
2018-12-20 00:18:53 +03:00
levlam
cba0f62ba9 Minor fixes.
GitOrigin-RevId: ffac148f714da737dcc1b12e56352995866f93b4
2018-12-19 23:35:13 +03:00
Arseny Smirnov
e0b9cf2586 Fixes for updated tdutils
GitOrigin-RevId: 44ef7ad802652dba0f7e90f59fa2b81e72641db1
2018-12-19 17:49:13 +03:00
levlam
43b61eace0 Remove unused callback from SessionConnection.
GitOrigin-RevId: d59f2581e57acb8bad96197381d0e0698b932ed2
2018-12-11 23:34:46 +03:00
levlam
92d78e3b0b Remove unimplemented methods.
GitOrigin-RevId: 70011dde0a35258bcc67a166058bc49ba05e396a
2018-12-06 23:55:56 +03:00
levlam
f435fe62a1 Fix HTTP spelling.
GitOrigin-RevId: f7d5626657406c1506434053efa68f28b4b6d674
2018-12-05 18:46:19 +03:00
levlam
a091d1d0c4 Fix AuthKey storer.
GitOrigin-RevId: 5b3388ec2a924af487bb70aaa24965330663011c
2018-11-27 05:06:34 +03:00
Arseny Smirnov
591bfc542f Drop session when we have to ignore a packet
GitOrigin-RevId: 2c6cc5bb4a022f0d7701cd8d7f8d3e4530191fc7
2018-12-07 00:01:55 +03:00
levlam
16707b0602 Minor improvements.
GitOrigin-RevId: 25ac84d8020557804fc89845e9764c3d50b098d3
2018-11-20 20:52:42 +03:00
Arseny Smirnov
c6dd53a76e Session: set_online for nonmain connections
GitOrigin-RevId: 9bcfcdbaaf2440a307f221ab07aa650c449c3d26
2018-11-20 16:07:27 +04:00
levlam
69d9173dcd Minor Slice usage improvements.
GitOrigin-RevId: 44ceed78dfc3ec459a0c40b6863d1d6ffd863a64
2018-11-06 23:25:09 +03:00
levlam
2c6bd673c7 Use as_slice<Int> if possible.
GitOrigin-RevId: 931b5609e2eae0d5655287e84a71724f07d4090c
2018-11-06 19:00:03 +03:00
levlam
5d5c55596e Minor improvements.
GitOrigin-RevId: 2f2099d91867ec302ff2d9426b6b088c8c625720
2018-11-01 20:08:20 +03:00
Arseny Smirnov
27770ce060 Destroy mtproto keys on logout
GitOrigin-RevId: 8ac2bafd2d1897dc0942a33d8406ea8c2e5dfaa7
2017-12-29 23:34:39 +03:00
levlam
8de6d7484f Fix call to PEM_read_bio_RSAPublicKey.
GitOrigin-RevId: 099e4b08a21f1d6788751222f7c98a6ab696eb49
2018-10-27 02:51:27 +03:00
levlam
28bfa4c4a6 Fix some MSVC Analyzer warnings.
GitOrigin-RevId: f62e8173ae9a5b78818f6575548ce22d4aa5c51d
2018-10-26 17:11:20 +03:00
levlam
2ca74ffacf Add debug.
GitOrigin-RevId: 777b78434c43fc443c980c1b8859184ffe0bce17
2018-10-25 15:49:30 +03:00
levlam
81890f309f Workaround clang ICE "ran out of registers during register allocation".
GitOrigin-RevId: d977f131b117c3d3907e505c6245ff587b7c6db0
2018-10-21 01:36:26 +03:00
levlam
f948956bf7 Use td::unique_ptr instead of std::unique_ptr whenever possible.
GitOrigin-RevId: 424beb72dc62efdefdbffb75f1036ba9417f84cb
2018-09-27 04:19:03 +03:00
levlam
9971b52b81 Make subscribe a static method of Scheduler.
GitOrigin-RevId: e80024cfa63a37fb9b64f514ac3407d4e97c7302
2018-09-11 01:20:41 +03:00
levlam
fd90bf435e A lot of fixes.
GitOrigin-RevId: c7c16991da51e09a685537a444385852e8e93af4
2018-09-07 03:41:21 +03:00
Arseny Smirnov
8a28e4b461 Almost compiles
GitOrigin-RevId: aad536022caddba0446a761e7ab1f3b4ac64f53b
2018-08-14 10:42:40 +03:00
levlam
7a14de987c Remove unneeded forward declarations.
GitOrigin-RevId: e33aac4e7ac27efe2757fdd421115637359bcf5e
2018-09-05 22:31:33 +03:00
levlam
e7929ac51e Mark default switch cases as UNREACHABLE.
GitOrigin-RevId: 8d17b9d6981f23d45d140b0f5deaa12cff734abb
2018-09-05 21:07:50 +03:00
Arseny Smirnov
84429d0617 SessionConnection: fix requesting of salt when Time::now() is close to zero
GitOrigin-RevId: cc585b4f8a5895964c24e947f855cc9248883961
2018-09-04 17:01:01 +03:00
levlam
c12ed8d9cc Improve logging.
GitOrigin-RevId: b361ebec579228514f4531465144d49aeb2cd7b5
2018-08-22 04:04:09 +03:00
levlam
c19ab1adbc Minor HTTP-proxy fixes.
GitOrigin-RevId: 03d1ca116707c358cd1a414046222236ee2d09b4
2018-08-17 19:03:07 +03:00
levlam
af4c366fdd Remove legacy DH functions.
GitOrigin-RevId: 13efa3ef84b99095170df7f5c994482eb9606fe2
2018-08-11 13:29:06 +03:00
levlam
73aa76dc5f Pre-check DH parameters.
GitOrigin-RevId: 98a488559b95651eab0c43b747a1f1fae2b716a5
2018-08-09 23:41:01 +03:00
levlam
466ebd2908 Add DhHandshake::check_config method.
GitOrigin-RevId: 1f9bbd0539454c2e6acbfe3be514614985a2d713
2018-08-09 22:56:24 +03:00
levlam
c44361fb60 Add functions for getting BigNum parameters of DhHandshake.
GitOrigin-RevId: 7ad8d822f5d4c696769b5585b6fc6533ba56d0e0
2018-08-08 22:57:37 +03:00
levlam
5e6672ee26 Better HTTP max_wait calculation.
GitOrigin-RevId: 36a149e8d4a2b46ee5e2d23514a8a78d6ad696fc
2018-07-27 12:15:29 +03:00
levlam
8de0bcd0a6 Add support for HTTP-only HTTP proxies.
GitOrigin-RevId: 7b8e3e7afb0f26c8e8fa97b0ffff5d1ad0267b5c
2018-07-27 03:54:25 +03:00
levlam
e2a90b9edf Fix some string to Slice conversions.
GitOrigin-RevId: 79ddee1a90c633cc1b1df5c8e3d9917027bad0f3
2018-07-08 02:47:46 +03:00
levlam
90f0f006b4 Check that storer unsafe doesn't overflows.
GitOrigin-RevId: ffbdcbbba7d26688b59cda00318d02fc06e402dc
2018-07-06 23:33:11 +03:00
levlam
deecdb66bc Fix some td/actor/ includes.
GitOrigin-RevId: f9cf960b96018c4eb6169d2ec6cb5d3fbc16c0ec
2018-07-03 22:29:04 +03:00
levlam
7150cfc8b2 Add disable_top_chats option.
GitOrigin-RevId: 732ba115f67d19585b4e2f4aae024194c6e65174
2018-06-26 22:51:00 +03:00