19 Commits

Author SHA1 Message Date
Bright Chen c9778ca1a3 Refactor NULL with nullptr in test (#3464) 2026-08-19 13:26:18 +08:00
wwbmmm ef7e5b9ce2 Keep compatible with MesaLink and old version OpenSSL 2026-07-30 14:10:05 +08:00
wwbmmm 436571e725 Add TLS peer name verification for clients 2026-07-26 11:43:47 +08:00
Bright Chen 56445c5076 Support LeakSanitizer (#3361) 2026-06-28 14:04:39 +08:00
neilxxxxx ce58581188 feat:Support for TLSv1.3 (#3319)
* feat:Support for TLSv1.3

* Align other UTs in this file

---------

Co-authored-by: lairongzeng <lairongzeng@bigo.sg>
2026-06-14 11:45:55 +08:00
Felix-Gong f98d5d0628 Fix HTTPS pooled client crash on unexpected SSL EOF (#3316)
* Fix HTTPS pooled client crash on unexpected SSL EOF

When OpenSSL 3.x detects unexpected EOF (peer closed without
close_notify), SSL_read returns 0 with SSL_ERROR_SSL. The code
didn't return -1, causing error_code=0 to propagate to
Controller::SetFailed() which triggers CHECK(false).

Fix by returning -1 with errno=ESSL when SSL errors are detected
in DoRead(), instead of falling through and returning nr.

Discovered during RISC-V porting and integration testing.

Fixes #3307
Signed-off-by: Felix Gong <gongxiaofei24@iscas.ac.cn>

* Add unit test for unexpected SSL EOF handling

Test that Socket::DoRead() returns -1 with errno=ESSL when the remote
side closes the TCP connection without sending close_notify, verifying
the fix in commit 7a1dfe7c.

---------

Signed-off-by: Felix Gong <gongxiaofei24@iscas.ac.cn>
2026-06-05 10:30:31 +08:00
Bright Chen 477fa492d6 Fix UAF in SSLTest.connect_on_create (#3311) 2026-05-27 15:52:56 +08:00
Bright Chen c93d0e06f5 Fix gflag namespace (#2877) 2025-01-18 17:49:51 +08:00
Bright Chen 15469ed314 Support connect on socket create (#2574) 2024-06-13 12:23:28 +08:00
Ran Miller 09acd32715 Server support ALPN with OpenSSL (#2102)
* Server support ALPN with OpenSSL

* Fix SSL unittest compile error

* Add ALPN protocol unittest

* Add ALPN protocol doc
2023-08-30 11:14:03 +08:00
Bright Chen bc6f30deee Force SSL for all connections of Acceptor (#2231)
* Force SSL for all connections

* Force SSL for all connections of Acceptor

* Force SSL option in ServerOptions
2023-06-25 14:35:36 +08:00
Weibing Wang 078051f9bf Update license header to Apache 2019-06-20 14:22:57 +08:00
gejun 51259c0b5d Move reuse_addr from server.cpp to endpoint.cpp and make the code more robust 2019-03-22 19:45:06 +08:00
Yiming Jing d0589fbb13 test: set SNI only when SSL_CTRL_SET_TLSEXT_HOSTNAME or USE_MESALINK is defined 2019-01-28 12:47:53 -08:00
Yiming Jing 1348c84270 test: set SNI for the SSL unit tests
MesaLink requires an SNI set in client session. This commit sets the SNI
in the test cases. Note OpenSSL is not affected by this change.
2019-01-23 14:51:09 -08:00
gejun db844fd99a Misc improvements on SSL-related code 2018-09-07 19:40:16 +08:00
renzhong915@gmail.com 9cfe9abe4f use GFLAGS_NS instead of google 2018-05-21 22:03:37 +08:00
old-bear c8b7aa8115 + Minor fix and guard on SSL 2018-04-24 14:18:31 +08:00
old-bear 3cd47b702b + Enable SSL request for single endpoint channel 2018-04-10 14:51:55 +08:00