Giter Club home page Giter Club logo

Comments (9)

geoperez avatar geoperez commented on July 25, 2024

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

from embedio.

sameera avatar sameera commented on July 25, 2024

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)?

from embedio.

geoperez avatar geoperez commented on July 25, 2024

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.

from embedio.

sameera avatar sameera commented on July 25, 2024

Just checking in: Have you decided on either way?

from embedio.

mariodivece avatar mariodivece commented on July 25, 2024

@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/

from embedio.

sameera avatar sameera commented on July 25, 2024

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.

from embedio.

sameera avatar sameera commented on July 25, 2024

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.

from embedio.

mariodivece avatar mariodivece commented on July 25, 2024

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.

from embedio.

mariodivece avatar mariodivece commented on July 25, 2024

As an update, a combination of the following methods/packages should work:
https://github.com/segor/SslCertBinding.Net
http://stackoverflow.com/questions/30131591/httplistener-with-ssl-certificate-hanging-on-getcontext

from embedio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.