1## Background 2 3libressl is another fork of Openssl. 4 5## Example build for libressl itself 6 7If you unpack or clone into `/path/to/libressl` and enter that dir... 8 9``` 10$ mkdir build 11$ cd build 12$ cmake .. 13$ make -j8 14``` 15 16## Example build for lws against libressl 17 18You can just build lws as you would for a specific version of openssl 19 20``` 21$ mkdir build 22$ cd build 23$ cmake .. -DLWS_OPENSSL_LIBRARIES='/path/to/libressl/build/tls/libtls.a;/path/to/libressl/build/ssl/libssl.a;/path/to//libressl/build/crypto/libcrypto.a' -DLWS_OPENSSL_INCLUDE_DIRS=/path/to/libressl/include -DLWS_WITH_MINIMAL_EXAMPLES=1 24$ make -j8 25``` 26 27Libressl by default will look for a trust bundle in `/usr/local/etc/ssl/cert.pem`, you either have to 28symlink this to your trust bundle if that doesnt happen to be where it is, or give your app the trusted CA 29specifically as is done for MBEDTLS and WOLFSSL in the examples. 30 31In Fedora, the system trust store can be found at `/etc/pki/tls/cert.pem`, so you can symlink it 32 33``` 34$ sudo mkdir -p /usr/local/etc/ssl 35$ sudo ln -sf /etc/pki/tls/cert.pem /usr/local/etc/ssl/cert.pem 36``` 37 38after that you can run examples from the build dir, eg, 39 40``` 41$ ./bin/lws-minimal-http-client 42[2021/02/08 20:10:52:0781] U: LWS minimal http client [-d<verbosity>] [-l] [--h1] 43[2021/02/08 20:10:52:0784] N: LWS: 4.1.99-v4.1.0-269-g762ef33fca, loglevel 1031 44[2021/02/08 20:10:52:0784] N: NET CLI SRV H1 H2 WS IPv6-absent 45[2021/02/08 20:10:52:0786] N: ++ [wsi|0|pipe] (1) 46[2021/02/08 20:10:52:0787] N: ++ [vh|0|netlink] (1) 47[2021/02/08 20:10:52:0802] N: ++ [vh|1|default] (2) 48[2021/02/08 20:10:52:1850] N: ++ [wsicli|0|GET/h1/warmcat.com] (1) 49[2021/02/08 20:10:52:2982] N: ++ [mux|0|h2_sid1_(wsicli|0|GET/h1/warmcat.com)] (1) 50[2021/02/08 20:10:52:3271] U: Connected to 46.105.127.147, http response: 200 51[2021/02/08 20:10:52:3335] U: RECEIVE_CLIENT_HTTP_READ: read 4087 52[2021/02/08 20:10:52:3335] U: RECEIVE_CLIENT_HTTP_READ: read 4096 53[2021/02/08 20:10:52:3526] U: RECEIVE_CLIENT_HTTP_READ: read 4087 54[2021/02/08 20:10:52:3526] U: RECEIVE_CLIENT_HTTP_READ: read 4096 55[2021/02/08 20:10:52:3543] U: RECEIVE_CLIENT_HTTP_READ: read 4087 56[2021/02/08 20:10:52:3543] U: RECEIVE_CLIENT_HTTP_READ: read 4096 57[2021/02/08 20:10:52:3545] U: RECEIVE_CLIENT_HTTP_READ: read 3502 58[2021/02/08 20:10:52:3546] U: LWS_CALLBACK_COMPLETED_CLIENT_HTTP 59[2021/02/08 20:10:52:3546] N: -- [wsi|0|pipe] (0) 276.019ms 60[2021/02/08 20:10:52:3547] N: -- [mux|0|h2_sid1_(wsicli|0|GET/h1/warmcat.com)] (0) 56.417ms 61[2021/02/08 20:10:52:3566] N: -- [vh|1|default] (1) 276.384ms 62[2021/02/08 20:10:52:3566] N: -- [wsicli|0|GET/h1/warmcat.com|default|h2|h2] (0) 171.599ms 63[2021/02/08 20:10:52:3567] N: -- [vh|0|netlink] (0) 277.974ms 64[2021/02/08 20:10:52:3567] U: Completed: OK 65``` 66 67