Solved Qt for webassembly do not support ssl?
-
Using QNetworkAccessManager to post data to a server, when I connect the signal of QSslError, compiler tell me
"No member named sslErrors in QNetworkReply" -
As @sierdzio mentioned, it do not support ssl yet. They mark this as P2 bug, guess I would have a long time cannot use Qt for webassembly to work with aws, unless not the network module.
-
Did you build openssl with emscripten and then configure/compile Qt?
That said, connecting to an https url should just work without Qt's ssl support -
@lorn-potter no, do not intend to compile Qt and openssl for myself, not now, l prefer html, css and js for the project, unless l know they work and able to ship the poc in a few days.
In the contrary, compile Qt with openssl with em++ do not has any guarantee it will work, if there do not exist any technical issues, l believe Qt team already ship the Qt5.13.1 with ssl support.
-
@tham said in Qt for webassembly do not support ssl?:
if there do not exist any technical issues, l believe Qt team already ship the Qt5.13.1 with ssl support.
Yeah but still you need to build/ link OpenSSL manually on each platform. That's mostly due to export restrictions attached to OpenSSL library.
-
@sierdzio Thanks, I am totally fine with that :). Compile openssl and compile openssl with Qt are different story.
-
@lorn-potter said in Qt for webassembly do not support ssl?:
That said, connecting to an https url should just work without Qt's ssl support
Possible solutions I could come up are
- Use emscripten to call the js api and library
- Use the other library to communicate with network
Not sure which one could work, compare with the old solutions, the information of wasm are rare, will test solution1 first after I have luxury times
-
Use emscripten to call the js api and library work.
All you need to do are
- include js script in the app_name.html, before the
<script type='text/javascript'>
-
Use EM_JS to create a c function which called the js libs, I wrap them in the nameless namespace, not sure this is needed or not.
-
I do not add the global variable into Module or window object, maybe this matter, or maybe not.
Qt for webassembly is an amazing technology, thanks for the efforts.
Today we still suffer from huge binary size and immature core functions, hope these issue could become better in the future