Skip to content

Commit 7e80631

Browse files
committed
sai.json: libressl: update to use so
1 parent 579779b commit 7e80631

2 files changed

Lines changed: 51 additions & 27 deletions

File tree

.sai.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
"platforms": "none, rocky9/aarch64-a72a55-rk3588/gcc"
3232
},
3333
"default-examples-boringssl": {
34-
"cmake": "-DLWS_WITH_BORINGSSL=1 -DLWS_OPENSSL_INCLUDE_DIRS=\"/usr/boringssl/include\" -DLWS_OPENSSL_LIBRARIES=\"/usr/boringssl/lib64/libssl.so;/usr/boringssl/lib64/libcrypto.so\" -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_GENHASH=0",
34+
"cmake": "-DLWS_WITH_BORINGSSL=1 -DLWS_OPENSSL_INCLUDE_DIRS=\"/usr/boringssl/include\" -DLWS_OPENSSL_LIBRARIES=\"/usr/boringssl/lib64/libssl.so;/usr/boringssl/lib64/libcrypto.so\" -DLWS_WITH_MINIMAL_EXAMPLES=1",
3535
"platforms": "none, rocky9/aarch64-a72a55-rk3588/gcc"
3636
},
3737
"default-examples-libressl": {
38-
"cmake": "-DLWS_OPENSSL_LIBRARIES='/usr/libressl/lib64/libtls.a;/usr/libressl/lib64/libssl.a;/usr/libressl/lib64/libcrypto.a' -DLWS_OPENSSL_INCLUDE_DIRS=/usr/libressl/include -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_GENHASH=0",
38+
"cmake": "-DLWS_OPENSSL_LIBRARIES='/usr/libressl/lib64/libtls.so;/usr/libressl/lib64/libssl.so;/usr/libressl/lib64/libcrypto.so' -DLWS_OPENSSL_INCLUDE_DIRS=/usr/libressl/include -DLWS_WITH_MINIMAL_EXAMPLES=1",
3939
"platforms": "none, rocky9/aarch64-a72a55-rk3588/gcc"
4040
},
4141
"default-wolfssl": {

READMEs/README.build.md

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,13 @@ and libnsl, and only builds in 64bit mode.
127127

128128
**NOTE7**
129129

130-
Build and test flow against boringssl. Notice `LWS_WITH_GENHASH` is currently
131-
unavailable with boringssl due to their removing the necessary apis.
130+
Build and test flow against boringssl.
131+
132+
Notice since boringssl is based on openssl, it cannot coexist with openssl or
133+
other projects based directly on openssl, since they all share, eg,
134+
`/usr/include/openssl/...`. For that reason, boring build is installed
135+
into `/usr/boringssl/` here so it cannot conflict with other tls libraries.
136+
132137

133138
Build current HEAD boringssl
134139

@@ -138,38 +143,62 @@ Build current HEAD boringssl
138143
$ cd boringssl
139144
$ mkdir build
140145
$ cd build
141-
$ cmake .. -DBUILD_SHARED_LIBS=1
142-
$ make -j8
146+
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/boringssl -DBUILD_SHARED_LIBS=1
147+
$ make -j8 && sudo make -j8 install
143148
```
144149

145150
Build and test lws against it
146151

147152
```
148153
$ cd /projects/libwebsockets/build
149-
$ cmake .. -DOPENSSL_LIBRARIES="/projects/boringssl/build/ssl/libssl.so;\
150-
/projects/boringssl/build/crypto/libcrypto.so" \
151-
-DOPENSSL_INCLUDE_DIRS=/projects/boringssl/include \
154+
$ cmake .. -DOPENSSL_LIBRARIES="/usr/boringssl/lib64/libssl.so;\
155+
/usr/boringssl/lib64/libcrypto.so" \
156+
-DOPENSSL_INCLUDE_DIRS=/usr/boringssl/include \
152157
-DLWS_WITH_BORINGSSL=1 -DCMAKE_BUILD_TYPE=DEBUG
153-
$ make -j8 && sudo make install
154-
$ LD_PRELOAD="/projects/boringssl/build/ssl/libssl.so \
155-
/projects/boringssl/build/crypto/libcrypto.so" \
156-
/usr/local/bin/libwebsockets-test-server -s
158+
$ make -j8 && sudo make -j8 install
159+
$ /usr/local/bin/libwebsockets-test-server -s
157160
```
158161

159-
4. Finally you can build using the generated Makefile:
162+
**NOTE8**
160163

161-
```bash
162-
$ make
163-
```
164+
Build and test flow against libressl.
164165

165-
**NOTE8**
166+
Notice since libressl is based on openssl, it cannot coexist with openssl or
167+
other projects based directly on openssl, since they all share, eg,
168+
`/usr/include/openssl/...`. For that reason, libressl build is installed
169+
into `/usr/libressl/` here so it cannot conflict with other tls libraries.
170+
171+
Build current HEAD libressl
172+
173+
```
174+
$ cd /projects
175+
$ git clone https://github.com/libressl/portable.git
176+
$ cd portable
177+
$ mkdir build
178+
$ cd build
179+
$ cmake .. -DBUILD_SHARED_LIBS=1 -DOPENSSLDIR=/etc/ssl -DCMAKE_INSTALL_PREFIX=/usr/libressl
180+
$ make -j8 && sudo make -j8 install
181+
```
182+
183+
Build and test lws against it
184+
185+
```
186+
$ cd /projects/libwebsockets/build
187+
$ cmake .. -DOPENSSL_LIBRARIES="/usr/libressl/lib64/libtls.so;/usr/libressl/lib64/libssl.so;\
188+
/usr/libressl/lib64/libcrypto.so" \
189+
-DOPENSSL_INCLUDE_DIRS=/usr/libressl/include \
190+
-DLWS_WITH_LIBRESSL=1
191+
$ make -j8 && sudo make -j8 install
192+
$ /usr/local/bin/libwebsockets-test-server -s
193+
```
194+
195+
**NOTE9**
166196

167-
Build and test flow against AWS-LC. Notice `LWS_WITH_GENHASH` is currently
168-
unavailable with awslc due to their removing the necessary apis.
197+
Build and test flow against AWS-LC.
169198

170199
Notice since aws-lc is based on openssl, it cannot coexist with openssl or
171200
other projects based directly on openssl, since they all share, eg,
172-
`/usr/include/openssl/*`. For that reason, aws-lc build is shown as installed
201+
`/usr/include/openssl/...`. For that reason, aws-lc build is installed
173202
into `/usr/aws-lc/` here so it cannot conflict with other tls libraries.
174203

175204
Build current HEAD AWS-LC
@@ -181,7 +210,7 @@ Build current HEAD AWS-LC
181210
$ mkdir build
182211
$ cd build
183212
$ cmake .. -DBUILD_SHARED_LIBS=1 -DBUILD_TESTING=0 -DCMAKE_INSTALL_PREFIX=/usr/aws-lc
184-
$ make -j8
213+
$ make -j8 && sudo make -j8 install
185214
```
186215

187216
Build and test lws against it
@@ -196,11 +225,6 @@ Build and test lws against it
196225
$ /usr/local/bin/libwebsockets-test-server -s
197226
```
198227

199-
4. Finally you can build using the generated Makefile:
200-
201-
```bash
202-
$ make
203-
```
204228

205229
@section lcap Linux Capabilities
206230

0 commit comments

Comments
 (0)