wasmOpenSSL is a port of OpenSSL for nodejs and browser applications.
Note: This is a source-code build of OpenSSL using the Wasienv and Emscripten SDK, this makes both prerequisite for a successful porting of the library.
This script has been tested on Ubuntu 18.04
with OpenSSL version 1.1.1d
- Install
wasienv
:
~/ $ curl https://raw.githubusercontent.com/wasienv/wasienv/master/install.sh | sh
- Install
emscripten
:
~/ $ git clone https://github.com/emscripten-core/emsdk.git
~/ $ cd emsdk
~/emsdk $ git pull
~/emsdk $ ./emsdk install latest
~/emsdk $ ./emsdk activate latest
~/emsdk $ source ./emsdk_env.sh
- Compile wasmOpenSSL
It should be noted that in order for the script to execute successfully, both wasienv
and emcc
commands should be available
~/ $ cd WasmOpenSSL/ && chmod +x build.sh
~/WasmOpenSSL $ ./build.sh
{...SNIP...}
Done!
Results of the compilation are in the /build
folder.
- TO BE CONTINUED
-
Static declaration follows non-static declaration (syntax error)
In file included from crypto/ui/ui_openssl.c:111: /home/voltron/.local/lib/python3.6/site-packages/wasienv/stubs/termios.h:48:36: error: static declaration of 'tcgetattr' follows non-static declaration
FIX:
- Open
termios.h
int tcgetattr (int, struct termios *); -to-> static int tcgetattr (int, struct termios *); int tcsetattr (int, int, const struct termios *); -to-> static int tcsetattr (int, int, const struct termios *);
- Open