Am 02.05.2013 13:21, schrieb
muehlba...@googlemail.com:
> Hello there...
>
> I figured it out!
> You have also to accept the server certificate for the port the
> Websocket is running. I was only able to do that by entering the url
> with that port and doing it manually.
This is expected behavior for browsers, since browsers don't render
special dialogs (like "insecure certificate .. do you want to accept?")
for Web page _subresources_. Subresources are things like images, but
also WebSocket connections.
>
> Now communication over wss: and https: respectively works fine.
> However, I'm now facing another issue. Once I've opened the socket and
> closed it afterwards, I cannot reopen it again. Same for the website.
> After I have authenticated the client with its certificate to access the
> website and to allow the websocket connection, I cannot reload the page
> or reopen the socket. Only after deleting the browser cache, I'm able to
> authenticate again and open the socket. This seems to have something to
> do with browser ssl caching or something like that.
With Firefox, you can accept an invalid/insecure certificate
permantently. With Chrome - as far as I remember - you can only accept
for a browser session. Probably you can manually install your server
certificate using some settings dialog in Chrome.
Anyway. For production use, you should use a certificate signed by a CA
which certificate is built into the browser. Also important: this
certificate must include all intermediate CA certificates also. E.g. if
you use StartSSL, they have the root CA in all browsers, but the free
cert you get is signed with their intermediate cert. And the latter can
be downloaded automatically by Firefox, but not Chrome (or was it
reverse? dont remember). So include also the intermediate CA StartSSL
cert into your server cert.
Hope that helps. Getting WSS and certs right is somewhat tricky ..
Tobias
> connection accepted from peer
127.0.0.1:56614 <
http://127.0.0.1:56614>
> 2013-05-02 11:40:12+0200 [PubSubProtocol
> (TLSMemoryBIOProtocol),0,127.0.0.1] unsubscribed peer
>
127.0.0.1:56614 <
http://127.0.0.1:56614> from all topics
> 2013-05-02 11:40:12+0200 [PubSubProtocol
> (TLSMemoryBIOProtocol),0,127.0.0.1] WebSocketProtocol.onClose:
> wasClean=False
> code=1006
> reason=connection was closed uncleanly (peer dropped the TCP
> connection without previous WebSocket closing handshake)
> self.closedByMe=False
> self.failedByMe=False
> self.droppedByMe=False
> self.wasClean=False
> self.wasNotCleanReason=peer dropped the TCP connection without
> previous WebSocket closing handshake
> self.localCloseCode=None
> self.localCloseReason=None
> self.remoteCloseCode=None
> self.remoteCloseReason=None
>
> 2013-05-02 11:40:12+0200 [PubSubProtocol
> (TLSMemoryBIOProtocol),0,127.0.0.1] connection from
127.0.0.1:56614
> <
http://127.0.0.1:56614> lost
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
autobahnws+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>