Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self signed certificates in Safari cause 'Invalid certificate chain' #305

Closed
IsNull opened this issue Apr 11, 2016 · 1 comment
Closed

Comments

@IsNull
Copy link

IsNull commented Apr 11, 2016

The following applies if the server uses a self signed certificate without a valid CA. The 'invalid' certificate has however been added / accepted as certificate exception in the browser.

All browsers except Safari apply certificate exceptions from https automatically to the web-socket connection. Thus I can use sockjs just fine with all browsers except Safari. While this is a Safari "bug", I think sockjs should address this issue by automatically falling back to a non ws connection.

That being said, sockjs currently does not even notice that Safari cut off the connection, as both the connection callback as well as a subscription report success, while the browser error console shows a sparse error message from the browser:

WebSocket network error: OSStatus Error -9807: Invalid certificate chain

  • sockjs should not report connection success when the connection has been canceled by Safari
  • sockjs should automatically fallback in such a case to a non web-socket connection.

What do you think?

Last but not least, in regard of this issue, is there a way to force sockjs to use a certain fallback? This way I could test and probably workaround the issue until a better solution exists...

@IsNull
Copy link
Author

IsNull commented Apr 11, 2016

Oh boy, I am sorry guys. This issue seems to be resolved in the latest version. The error is shown anyway, but then it seems to properly fall back. 👍

I was not aware that a library I used for STOMP ng-stomp depended on a very out-dated version of this library ("sockjs": "0.3.4")

I will raise an issue against ng-stomp and close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant