-
Notifications
You must be signed in to change notification settings - Fork 172
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
Add mbedtls to support https & crypto #349
Comments
Hey there! Sure thing, I do want us to have mbedtls integrated, and migrate all the hashing stuff to it. That should not be a requirement for https in curl today though, since we link with the system one on most platforms, which in turn uses WinSSL, whatever calls it's thing or OpenSSL. Not ideal, I know, but one step at a time :-) |
I'm wondering if we can import When I run
the C source code is downloaded to |
Deno uses Rust and OpenSSL and I'd like to keep txikiJS simple, so I think mbedtls is a better fit for the project. |
Oh, nice! Might be able to reuse some of that! |
I tried building wotjs-core. Error thrown at
Can't the HTTP server parts be extracted and used within QuickJS? |
They can likely be migrated to txiki.js, since that's a fork, but a 2 year old one, and a lot has changed since. |
I've been testing server implementations, C and other languages. I think busybox's For my use case I just need to create a server to load an HTML page so I can hand off handling the request and response to a local Other options include coralmicro HTTP server https://github.com/google-coral/coralmicro/blob/main/libs/base/http_server.cc, and Chromium's HTTP servr https://github.com/chromium/chromium/blob/main/net/server/http_server.cc. |
Unfortunately none of those options are a good fit for txiki.js. The BusyBox implementation is GPL, so incompatible with the current license. The other 2 are written in C++ and I don't want to start adding c++ code here. I think https://github.com/rsenn/qjs-net is a better option, but I need to integrate the event loop with libuv instead of using the default in libwebsockets, and last I checked it wasn't very well documented. |
@saghul I couldn't get https://github.com/rsenn/qjs-net to compile the last time I tried. There is also https://github.com/QuickJS-Web-project/quickwebserver, which I also had issues compiling after upstream updates. |
qjs-net is failing to build on Debian/Ubuntu Linux due to this
I'm not sure what to modify or pass to |
I'd suggest you open an issue on their repo. IIRC strlcpy comes from BSD. |
I noticed that now in txiki, http is implemented using curl, can we add support for https?
This may require adding a new dependency library mbedtls, if this is allowed I might be able to get this working
mbedtls also comes with a variety of encryption and decryption algorithms
Adding it can throw away the existing hashlib.js, it is very inefficient to let JS execute these algorithms
The text was updated successfully, but these errors were encountered: