Open CodeSpartan opened 5 years ago
Hi, any update on this issue ?
Hi, any update on this issue ?
The fix is in CodeSpartans comment, owner of the repo is inactive so pull request hasnt been accepted
Hi @Swaelo That error has been resolved. Now browser is giving me this error. WebSocket connection to "domain" failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
Any suggestions ?
The solution CodeSpartan found worked for me too.
@salmansaleem32 you need to create the server with a certificate, you can do it with openssl. In my case im using typescript with node
const Fs = require('fs');
const Https = require('https');
const WebSocketServer = require('ws').Server;
const httpsServer = Https.createServer({
cert: Fs.readFileSync('cert/cert.pem'),
key: Fs.readFileSync('cert/key.pem'),
passphrase : 'certPassword'
});
const wss = new WebSocketServer({server: httpsServer});
Error log:
In sta/websocket-sharp, this is fixed by adding this line:
ws.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12;
Is it possible to fix this in this library? I could add this line myself in the constructor, I'm just not sure what's the correct way to treat it.