Commit Graph

159 Commits

Author SHA1 Message Date
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
levlam
46535703e0 Fix some includes.
GitOrigin-RevId: 901d167d7197e4c0222656e9fc1f9fc0e216e44b
2018-06-26 02:43:11 +03:00
levlam
aa13a57a3c Update layer to 82. Contact.vcard support.
GitOrigin-RevId: 302d65351cfaeb6b4e82c594565ab1aef18b2a42
2018-06-26 00:10:53 +03:00
levlam
046ad3b752 Make TlStorerUnsafe buffer unsigned.
GitOrigin-RevId: 8bb19c10e4edd8b015d3a2be0449426c9c07f7df
2018-06-25 02:58:43 +03:00
levlam
8c45bd919e Fix pad_size type.
GitOrigin-RevId: 3ec3f1f14a3a54fc28131f3b4bc7bda383e3a704
2018-06-24 19:50:09 +03:00
levlam
44bc3d5f08 Add debug to send_query.
GitOrigin-RevId: 2ac237e8288335acad7f9f8f0a3ab6ef686210b7
2018-06-21 22:14:52 +03:00
Arseny Smirnov
9d5dd09fd7 mtproto::Transport: bugfix
GitOrigin-RevId: ea53041b64a84292830e25e111bdbd31d21f1911
2018-06-20 00:00:02 +03:00
levlam
744df9f511 Minor fixes.
GitOrigin-RevId: fb737b1ddcb72ce4c6393d9e282336184285dafd
2018-06-17 22:56:21 +03:00
Arseny Smirnov
69cf867d47 0xdd quick ack
GitOrigin-RevId: 3e35df493f46f91cd1cf81671819848d9640fedd
2018-06-17 20:52:40 +03:00
levlam
8a6b550a86 New transport improvements.
GitOrigin-RevId: cc7b8aafe6a30009fd4d549ef969c373ce2b9d9a
2018-06-16 03:03:14 +03:00
Arseny Smirnov
c02d4505e4 0xdd transport
GitOrigin-RevId: 241c2fcea3ebaac20fc68531692cbd299a9de95a
2018-06-15 21:54:22 +03:00
Arseny Smirnov
fdd898124b Ignore inbound unencrypted packets padding (0xdd transport)
GitOrigin-RevId: 7da991cb741b65fe2ade26ccc4fc3ef3c788db7a
2018-06-15 21:11:07 +03:00
Arseny Smirnov
d07c172ec8 Padding in unencrypted packets
GitOrigin-RevId: e547cedd27afebc8023afaca5ef0a7af6e2f3075
2018-06-15 18:11:48 +03:00
Arseny Smirnov
b44c7cfcb8 Fix alignment of recieved packet
GitOrigin-RevId: 8cbb24dabb7cf8050cecd47364df496b122db559
2018-06-15 17:30:32 +03:00
levlam
cb1e0374af Minor fixes.
GitOrigin-RevId: 7deac5583350d64cf6fd0e323f2291804e3ba995
2018-06-05 20:44:41 +03:00
levlam
2c5f5a8587 Improve PingConnection.
GitOrigin-RevId: be82fa18e2f9a154d3d276b5618d0ca72b9e4282
2018-06-04 19:58:54 +03:00
levlam
e11d4e02db Fix HeaderCreator usage.
GitOrigin-RevId: 1ac210190048ad2797751630a838f74541dda37d
2018-06-01 23:45:34 +03:00
Arseny Smirnov
c783a946c3 Session: fix warning
GitOrigin-RevId: 6183ab2342222670680057843fc3d908b7995ce8
2018-05-30 19:38:17 +03:00
levlam
db6777c7f2 Use p_q_inner_data_dc.
GitOrigin-RevId: f1e57b83d850ac4233bf9508b6585aaf0efe1423
2018-05-23 19:49:05 +03:00
levlam
490c4e86a2 Minor fixes.
GitOrigin-RevId: f972e24191cc31262bf655774bc6193277b8842b
2018-05-18 15:57:40 +03:00
Arseny Smirnov
efc5cbb8ad Mtproto secret support
GitOrigin-RevId: 3efeb3f309b76074d6581d68e9a9b20df79e82ae
2018-04-30 20:01:18 +03:00
levlam
8524a99faa Fix getter names.
GitOrigin-RevId: 19b6d420475d7ca7161fbb19658dcefa73de094f
2018-04-19 15:23:54 +03:00
levlam
1b75824e3e Better README.md.
GitOrigin-RevId: 1eb3febfd362c2e32a5ed4b1bf38ce88652bd2c0
2018-03-13 22:45:00 +03:00