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

HTTPS/WSS support #26

Closed
sameera opened this issue Dec 17, 2015 · 9 comments
Closed

HTTPS/WSS support #26

sameera opened this issue Dec 17, 2015 · 9 comments
Assignees

Comments

@sameera
Copy link

sameera commented Dec 17, 2015

Is there a way to enable wss support?

@geoperez
Copy link
Member

Hi @sameera, did you already try to use the EmbedIO binding to wss with a certificate in your machine? For example following these steps to do the cert thing: http://stackoverflow.com/questions/11403333/httplistener-with-https-support

@sameera
Copy link
Author

sameera commented Dec 18, 2015

Hi,
Thanks, I'll try it out. However, at a glance, this approach seems to limit me to a static port number (I.e. I'd have to hard code the port in the app as the cert is bound manually to one).
What do you consider the effort would be to do what socketsharp is doing (loading the cert off a .pfx file)?

@geoperez
Copy link
Member

The implementation in socketsharp looks really good, I'm going to take a deep look and let you know if we move to implement something similar.

@sameera
Copy link
Author

sameera commented Dec 22, 2015

Just checking in: Have you decided on either way?

@mariodivece
Copy link
Member

@sameera Could you please try the following nuget? This is the simplest, most transparent way of setting certificates on ports and bindings. Please check it out and let us know how it goes. https://www.nuget.org/packages/SslCertBinding.Net/

@sameera
Copy link
Author

sameera commented Dec 22, 2015

Thanks Mario.
This would probably work for most scenarios; however, not mine.
Reading through this implementation, looks like it needs the certificate to already be in the user's Certificate store. Which means the certificate is already installed and this simply does port binding to it.

In my scenario, I have a standalone executable that I distribute which has the embedded websocket server. I want to embed the X509 certificate in the app as an embedded resource. I got this working fine with WebSocket-Sharp library. But, the implementation of WSS is almost done from scratch as it defines it's own HttpListener, WebSocketContext etc. rather than using the native .NET counterparts. So, (among other reasons) I'd prefer to use a EmbedIO instead if possible.

@sameera
Copy link
Author

sameera commented Dec 23, 2015

Hi,
Just want to let you know that this is no longer a requirement for me. Therefore, I could close this issue for now unless, this is a feature you are planning to build eventually.

@mariodivece
Copy link
Member

This is an old thread. I'm closing this issue because there currently are no plans to implement X509 certs within EmbedIO but rather configure them via standard methods.

@mariodivece
Copy link
Member

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

No branches or pull requests

3 participants