nv-websocket-client: Bad SSL behaviour - insecure and does not support SNI
I just spent an hour digging through this so I might be wrong, but it seems to me the wss: protocol is seriously broken.
TL;DR It connectes to a server, doesn’t support SNI and doesn’t check the certificate hostname. (I used tcpdump/wireshark).
The reason: I’d say this: http://stackoverflow.com/a/28031673/149901
leads to this:
I.e. as per the stackoverflow issue, it seems that connecting to the IP adress results in skipping all these checks. (BTW: haproxy requires correct use of SNI)
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 3
- Comments: 40 (10 by maintainers)
I think that I got SNI working on Android 4.4.1 and up with this code:
Inspired by: https://github.com/smarek/httpclient-android/issues/7
I’m having the same issue.
It happens in devices with android version 6 and older… (7 and 8 works)
@twogood No, we didn’t, because we consider using reflection kind of a last resort solution. In our case we prefer using IP-based TLS even though it’s more costly. However, it’s good to know that another workaround exists, so thanks for sharing! Maybe we’ll add it as a fallback, because in situations where it wouldn’t work, it would at least not do any harm. But then again, it would make testing even more complex and error prone.