Skip to content

Commit

Permalink
Merge pull request #10 from mindsphere/dev
Browse files Browse the repository at this point in the history
cjson version is upgraded to 1.7.15. minimum required openssl and lib…
  • Loading branch information
mclib-dev authored Mar 18, 2022
2 parents 92ab765 + 4a4b958 commit a988495
Show file tree
Hide file tree
Showing 14 changed files with 548 additions and 158 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# [4.3.2] (2022-03-19)

## Security

* cJSON library version is upgraded to 1.7.15 since the old version had security vulnerabilities.
* Minimum required OpenSSL version is updated to 1.1.1m for users using OpenSSL as security library and CMake as the build tool.
* Minimum required libCurl version is updated to 7.81.0 for users using libCurl as http client and CMake as the build tool.

# [4.3.1] (2021-05-15)

## Bug Fixes
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ any components that it depends on.
- LibCurl is used as the default HTTP client in MCL but developers have the option to easily replace LibCurl with other HTTP client implementations.
Make sure LibCurl is installed on your system before building MCL if you are going to use LibCurl as the HTTP client.
Steps to build LibCurl for your target system are described in the following sections of this document.
Developers are encouraged to use newer versions of LibCurl but note that MCL is tested with LibCurl version 7.65.3.
Developers are encouraged to use newer versions of LibCurl but note that MCL is tested with LibCurl version 7.81.0.

Please make sure your HTTP client implementation is configured to use TLS v1.2 implementation.

- OpenSSL is used as the default TLS and cryptography library but developers have the option to easily replace OpenSSL with other implementations.
Make sure OpenSSL is installed on your system before building MCL if you are going to use OpenSSL as TLS and cryptography library.
Steps to build OpenSSL are described in the following sections of this document.
Developers are encouraged to use newer versions of OpenSSL 1.1.x but note that MCL is tested with OpenSSL version 1.1.1d.
Developers are encouraged to use newer versions of OpenSSL 1.1.x but note that MCL is tested with OpenSSL version 1.1.1m.

One of following ciphers must be supported and configured for SSL handshaking:

Expand Down Expand Up @@ -258,25 +258,25 @@ Both the core component and the connectivity extension will be built. See **MCL
These are the steps of the build process in order:

### Building OpenSSL
Download OpenSSL package [openssl-1.1.1d.tar.gz](https://www.openssl.org/source/) and in your download directory run the following commands where
Download OpenSSL package [openssl-1.1.1m.tar.gz](https://www.openssl.org/source/) and in your download directory run the following commands where
**\<OpenSSL_Install_Directory\>** refers to the directory you want to install OpenSSL:

```sh
$ tar -xvzf openssl-1.1.1d.tar.gz
$ cd openssl-1.1.1d
$ tar -xvzf openssl-1.1.1m.tar.gz
$ cd openssl-1.1.1m
$ ./config --prefix=<OpenSSL_Install_Directory> -Wl,-rpath=<OpenSSL_Install_Directory>/lib shared -fPIC
$ sudo make install
```

Now, there must be a folder named **openssl** in **\<OpenSSL_Install_Directory\>/include** and shared objects named **libcrypto.so** and **libssl.so** in **\<OpenSSL_Install_Directory\>/lib**.

### Building Libcurl
Download libcurl package [curl-7.65.3.tar.gz](https://curl.haxx.se/download/) and in your download directory run the following commands where
Download libcurl package [curl-7.81.0.tar.gz](https://curl.haxx.se/download/) and in your download directory run the following commands where
**\<libcurl_Install_Directory\>** refers to the directory you want to install libcurl:

```sh
$ tar -xvzf curl-7.65.3.tar.gz
$ cd curl-7.65.3
$ tar -xvzf curl-7.81.0.tar.gz
$ cd curl-7.81.0
$ LDFLAGS="-Wl,-R<OpenSSL_Install_Directory>/lib" ./configure --enable-http --with-ssl=<OpenSSL_Install_Directory> --prefix=<libcurl_Install_Directory> --without-libssh2 --disable-ftp --disable-tftp --disable-file --disable-ldap --disable-rtsp --disable-dict --disable-telnet --disable-pop3 --disable-imap --disable-smb --disable-scp --disable-sftp --disable-smtp --disable-gopher --disable-manual
$ sudo make install
```
Expand Down
74 changes: 41 additions & 33 deletions ReadMe_OSS.htm

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build_helper_cross_compile_for_rpi.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
openssl_version=1.1.1d
curl_version=7.65.3
openssl_version=1.1.1m
curl_version=7.81.0
main_directory=../mcl_sandbox_for_rpi
mcl_directory=$(pwd)

Expand Down
4 changes: 2 additions & 2 deletions build_helper_linux.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
openssl_version=1.1.1d
curl_version=7.65.3
openssl_version=1.1.1m
curl_version=7.81.0
main_directory=../mcl_sandbox
mcl_directory=$(pwd)

Expand Down
8 changes: 4 additions & 4 deletions build_helper_win64.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set openssl_version=1.1.1d
set curl_version=7.65.3
set openssl_version=1.1.1m
set curl_version=7.81.0
set path_to_7zip="C:\Program Files\7-Zip"
set path_to_visual_studio="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional"
set path_to_visual_studio="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
set main_directory=..\mcl_sandbox
set mcl_directory=%cd%

Expand Down Expand Up @@ -29,7 +29,7 @@ nmake install_sw
cd ..

cd curl-%curl_version%\winbuild
nmake /f Makefile.vc mode=dll VC=15 WITH_SSL=dll MACHINE=x64 WITH_PREFIX=%main_directory%\install\ SSL_PATH=%main_directory%\install
nmake /f Makefile.vc mode=dll VC=16 WITH_SSL=dll MACHINE=x64 WITH_PREFIX=%main_directory%\install\ SSL_PATH=%main_directory%\install
cd ../..

mkdir mcl_build
Expand Down
6 changes: 3 additions & 3 deletions mcl_core/include/mcl_core/mcl_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

#define MCL_VERSION_MAJOR 4
#define MCL_VERSION_MINOR 3
#define MCL_VERSION_PATCH 1
#define MCL_VERSION_PATCH 2

#define MCL_VERSION_NUMBER 0x04030100
#define MCL_VERSION_STRING "4.3.1"
#define MCL_VERSION_NUMBER 0x04030200
#define MCL_VERSION_STRING "4.3.2"

#endif //MCL_VERSION_H_
Loading

0 comments on commit a988495

Please sign in to comment.