autobahn-testsuite icon indicating copy to clipboard operation
autobahn-testsuite copied to clipboard

Secure WebSocket listen requested, but no SSL context factory given

Open ghost opened this issue 8 years ago • 3 comments

Hey,

I cannot find any info on how to get the fuzzingserver working in SSL mode. I just get this error:

Secure WebSocket listen requested, but no SSL context factory given

The usage documentation is pretty nice for non-SSL but is IMO lacking for SSL. I do pass key and cert as arguments (-k, -c) and I changed the url in the spec to wss.

ghost avatar Sep 16 '16 08:09 ghost

I have the very same issue.

blub0hr avatar Mar 03 '17 15:03 blub0hr

I have the same problem. And I guess we need a passwordless file, is that correct?

But I also tried to add the certificate to firefox and tried to connect on 'http://localhost:8080/test_browser.html' via the 'wss' scheme instead of 'ws' to run any test. When the SSL client hello is sent, I dont get any answer from the fuzzing server.

n1tesh4dez avatar Jan 14 '20 11:01 n1tesh4dez

Sorry, not working on / following up with WS testsuite closely anymore these days. also, yes, the docs are not perfect. Anyways, to test WSS, one needs to:

  • provide a server key / cert (here is an example config https://github.com/crossbario/autobahn-testsuite/blob/master/examples/fuzzingserver/fuzzingserver_wss.json)
  • make sure that the fuzzing client accepts the cert - when the fuzzing client is a browser, and the cert is self-signed, you need to import/trust the self-signed cert
  • eg when fuzzing against Crossbar.io (at the WS level), Crossbar.io supports to open WS URLs using regular HTTP/browser: it will render a notice HTML page ("I am a WebSocket server, not HTTP, blabla") which allows one to easily import/trust the cert. after doing so, the fuzzing works

IOW: it is crucial that the fuzzed client/server seamlessly accepts the peer certificate - either because the trust root (CA) is built into the system/run-time, or because it was imported into that. also watch out: the default cert store used depends on browser and system.

hope above helps a bit .. let me know

oberstet avatar Jan 14 '20 13:01 oberstet