Giter VIP home page Giter VIP logo

Comments (15)

 avatar commented on May 21, 2024

Hello,

Yes you would only need to replace ssl.c with another implementation. Then we could add some ifdefs and make a folder, etc.

from usockets.

snej avatar snej commented on May 21, 2024

I'm starting on it... Question: Is it OK with you if I implement it in C++ (but of course making all the required functions extern "C")? I haven't coded in plain C in years, and it's kind of painful.

from usockets.

 avatar commented on May 21, 2024

Temporarily yes, it shouldn't be that hard to rewrite it in C later on

from usockets.

snej avatar snej commented on May 21, 2024

I’ve gotten it working enough to open a TLS client connection and do an HTTP GET. Next I’ll test the server side and then try a more interactive protocol.

I’m a bit unclear about the division of labor between the loop, context and socket objects. In your implementation, what led you to store data in one vs another? In particular, storing data in a loop rather than a socket. I may have to arrange things somewhat differently in my code because mbedTLS doesn’t allow a single TLS context to be used for both server and client sockets.

Also, what is copying contexts used for?

from usockets.

 avatar commented on May 21, 2024

What kind of error info are you thinking about? I do not want to expose 57 different system specific errors.

from usockets.

snej avatar snej commented on May 21, 2024

(Nevermind about the errors, above; I shouldn't have sidetracked this issue! Filed #61 and deleted the equivalent comment above. I'll reply on the other issue's thread.)

I am still curious about the division of labor between loop/context/socket. You're registering the BIO callbacks at the loop level, which then means other fields related to I/O are stored at the loop level although they're really socket-specific. Is this a memory optimization based on the knowledge that the BIO functions are always called (indirectly) from the owning loop so there's no concurrency problem?

from usockets.

 avatar commented on May 21, 2024

Yes the same BIO is shared among all SSL. Put as much as possible in the loop then add much as possible in the context then add little as possible in the socket. It's entirely single threaded

from usockets.

 avatar commented on May 21, 2024

Closing due to inactivity

from usockets.

 avatar commented on May 21, 2024

You mind sharing the code you have so far? I would like to check it against OpenSSL

from usockets.

snej avatar snej commented on May 21, 2024

Sure -- https://gist.github.com/snej/a9cde8eb3f8ee0d228898f8715bb4f26

from usockets.

 avatar commented on May 21, 2024

Kool, thanks

from usockets.

xingyun86 avatar xingyun86 commented on May 21, 2024

Sure -- https://gist.github.com/snej/a9cde8eb3f8ee0d228898f8715bb4f26

Could you give me a copy code with mbedtls usockets? I want to use usockets with mbedtls too.

from usockets.

snej avatar snej commented on May 21, 2024

I posted the code I had. I don't use this library anymore, so I don't have anything stable, sorry.

from usockets.

 avatar commented on May 21, 2024

Btw, how is mbedTLS compared to OpenSSL, WolfSSL? Are there any benchmarks?

from usockets.

 avatar commented on May 21, 2024

Every post, benchmark points towards mbedtls being complete shit in performance.

It has cleaner interfaces but performs really bad, the devs don't even care that they haven't added hardware accelerated support on ARM which makes it 10x slower than OpenSSL

from usockets.

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.