srs icon indicating copy to clipboard operation
srs copied to clipboard

API: Cannot resolve which SSL cert, with SNI based certificates (e.g. CloudFlare)

Open matclayton opened this issue 3 years ago • 8 comments

Thank you, we can confirm this works for basic use cases. However there is a bug with SNI based certificates (e.g. CloudFlare) as it connects to the ip address and not the host, therefore the server cannot resolve which SSL cert to serve. We'll open a new Issue, again thank you for this great work!

matclayton avatar Oct 17 '20 22:10 matclayton

https works for me! I'm using the docker version of SRS 3.

toontoet avatar Nov 03 '20 10:11 toontoet

Interesting I was testing 4 and it didn’t, it appeared to change to http. I’ll check it again.

TRANS_BY_GPT3

matclayton avatar Nov 08 '20 23:11 matclayton

Fixed in SRS4

winlinvip avatar Dec 01 '20 11:12 winlinvip

Thank you, we can confirm this works for basic use cases. However there is a bug with SNI based certificates (e.g. CloudFlare) as it connects to the ip address and not the host, therefore the server cannot resolve which SSL cert to serve. We'll open a new Issue, again thank you for this great work!

matclayton avatar Dec 01 '20 14:12 matclayton

Seeing an error when connecting with custom domain name.

ignore task failed code=4042 : callback on_dvr https://api....com/callbacks/on_dvr/ : http post on_dvr uri failed, response=, code=0 : http: client post : http: connect server : http: ssl connect https api.....com:443 to=30000ms, rto=30000ms : handshake r0=0, r1=2.

Dont see any logs for on_dvr from my application. Could this be related to my certificate?

daxaxelrod avatar Jan 31 '21 01:01 daxaxelrod

@matclayton I reopened this issue, and changed the issue description.

winlinvip avatar Aug 29 '21 23:08 winlinvip

Is there any update for this issue? I have the same problem to using https with handshake error on SRS 4. [2022-05-08 15:17:43.848][Error][1][a9o488q7][0] serve error code=4042 : start : handshake : handshake r0=-1, r1=1 thread [1][a9o488q7]: do_cycle() [src/app/srs_app_http_conn.cpp:153][errno=0] thread [1][a9o488q7]: on_start() [src/app/srs_app_http_api.cpp:1106][errno=0] thread [1][a9o488q7]: handshake() [src/app/srs_app_conn.cpp:713][errno=0]

Alijaaan avatar May 08 '22 15:05 Alijaaan

Is there any update for this issue? I have the same problem to using https with handshake error on SRS 4. [2022-05-08 15:17:43.848][Error][1][a9o488q7][0] serve error code=4042 : start : handshake : handshake r0=-1, r1=1 thread [1][a9o488q7]: do_cycle() [src/app/srs_app_http_conn.cpp:153][errno=0] thread [1][a9o488q7]: on_start() [src/app/srs_app_http_api.cpp:1106][errno=0] thread [1][a9o488q7]: handshake() [src/app/srs_app_conn.cpp:713][errno=0]

Ensure that you use an HTTPS API associated with a domain that possesses a valid SSL/TLS certificate, rather than relying on an IP address or localhost. e.g https://xyz.com:1986/rtc/v1/...

PooyaEimandar avatar Feb 12 '24 05:02 PooyaEimandar