I have websocket endpoint wss://http-testnet.hecochain.com/
to connect to,
but I cannot get its certificate to use within code.
While to certificate for HTTP URL you can just use browser (See 1) and 2) below), there is no way for WS as it is not displayed in browser
Links
openssl s_client -connect google.com:443 -showcerts
Well, because wss actually works over htttps port 443, so certificate is the same for wss:
openssl s_client -connect http-testnet.hecochain.com:443 -showcerts
openssl s_client -connect ws-testnet.hecochain.com:443 -showcerts