aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Sing <joshua@hypera.dev>2023-12-20 02:05:48 +1100
committerJoshua Sing <joshua@hypera.dev>2023-12-20 02:05:48 +1100
commitf25f055c64d54c62f1a1a1e97a903bce7b5e6ed3 (patch)
tree3fedbd91bb69a5eba163a0f4a526186b909d1532
parenta21a50397a7ae59315c5a5be2c73b1af142712d1 (diff)
downloadportable-f25f055c64d54c62f1a1a1e97a903bce7b5e6ed3.tar.gz
portable-f25f055c64d54c62f1a1a1e97a903bce7b5e6ed3.tar.bz2
portable-f25f055c64d54c62f1a1a1e97a903bce7b5e6ed3.zip
readme: tidy up styling
-rw-r--r--README.md94
1 files changed, 57 insertions, 37 deletions
diff --git a/README.md b/README.md
index 77f9a37..a132ff7 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
1![LibreSSL image](https://www.libressl.org/images/libressl.jpg) 1![LibreSSL image](https://www.libressl.org/images/libressl.jpg)
2## Official portable version of [LibreSSL](https://www.libressl.org) ## 2
3## Official portable version of [LibreSSL](https://www.libressl.org)
3 4
4[![Linux Build Status](https://github.com/libressl/portable/actions/workflows/linux.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/linux.yml) 5[![Linux Build Status](https://github.com/libressl/portable/actions/workflows/linux.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/linux.yml)
5[![macOS Build Status](https://github.com/libressl/portable/actions/workflows/macos.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/macos.yml) 6[![macOS Build Status](https://github.com/libressl/portable/actions/workflows/macos.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/macos.yml)
@@ -12,7 +13,7 @@ LibreSSL is a fork of [OpenSSL](https://www.openssl.org) 1.0.1g developed by the
12[OpenBSD](https://www.openbsd.org) project. Our goal is to modernize the codebase, 13[OpenBSD](https://www.openbsd.org) project. Our goal is to modernize the codebase,
13improve security, and apply best practice development processes from OpenBSD. 14improve security, and apply best practice development processes from OpenBSD.
14 15
15## Compatibility with OpenSSL: ## 16## Compatibility with OpenSSL
16 17
17LibreSSL provides much of the OpenSSL 1.1 API. The OpenSSL 3 API is not currently 18LibreSSL provides much of the OpenSSL 1.1 API. The OpenSSL 3 API is not currently
18supported. Incompatibilities between the projects exist and are unavoidable since 19supported. Incompatibilities between the projects exist and are unavoidable since
@@ -27,7 +28,7 @@ LibreSSL in order to use it, just as in moving between major versions of OpenSSL
27LibreSSL's installed library version numbers are incremented to account for 28LibreSSL's installed library version numbers are incremented to account for
28ABI and API changes. 29ABI and API changes.
29 30
30## Compatibility with other operating systems: ## 31## Compatibility with other operating systems
31 32
32While primarily developed on and taking advantage of APIs available on OpenBSD, 33While primarily developed on and taking advantage of APIs available on OpenBSD,
33the LibreSSL portable project attempts to provide working alternatives for 34the LibreSSL portable project attempts to provide working alternatives for
@@ -45,6 +46,7 @@ At the time of this writing, LibreSSL is known to build and work on:
45* AIX (5.3 and later) 46* AIX (5.3 and later)
46 47
47LibreSSL also supports the following Windows environments: 48LibreSSL also supports the following Windows environments:
49
48* Microsoft Windows (Windows 7 / Windows Server 2008r2 or later, x86 and x64) 50* Microsoft Windows (Windows 7 / Windows Server 2008r2 or later, x86 and x64)
49* Wine (32-bit and 64-bit) 51* Wine (32-bit and 64-bit)
50* Mingw-w64, Cygwin, and Visual Studio 52* Mingw-w64, Cygwin, and Visual Studio
@@ -64,20 +66,24 @@ or to the GitHub
64Severe vulnerabilities or bugs requiring coordination with OpenSSL can be 66Severe vulnerabilities or bugs requiring coordination with OpenSSL can be
65sent to the core team at libressl-security@openbsd.org. 67sent to the core team at libressl-security@openbsd.org.
66 68
67# Building LibreSSL # 69# Building LibreSSL
68 70
69## Prerequisites when building from a Git checkout ## 71## Prerequisites when building from a Git checkout
70 72
71If you have checked this source using Git, or have downloaded a source tarball 73If you have checked this source using Git, or have downloaded a source tarball
72from Github, follow these initial steps to prepare the source tree for 74from GitHub, follow these initial steps to prepare the source tree for
73building. _Note: Your build will fail if you do not follow these instructions! If you cannot follow these instructions (e.g. Windows system using CMake) or cannot meet these prerequistes, please download an official release distribution from https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ instead. Using official releases is strongly advised if you are not a developer._ 75building. _Note: Your build will fail if you do not follow these instructions!
76If you cannot follow these instructions (e.g. Windows system using CMake) or
77cannot meet these prerequistes, please download an official release distribution
78from https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ instead. Using official
79releases is strongly advised if you are not a developer._
74 80
751. Ensure you have the following packages installed: 811. Ensure you have the following packages installed:
76 automake, autoconf, git, libtool, perl 82 automake, autoconf, git, libtool, perl
772. Run `./autogen.sh` to prepare the source tree for building or 832. Run `./autogen.sh` to prepare the source tree for building or
78 run `./dist.sh` to prepare a tarball. 84 run `./dist.sh` to prepare a tarball.
79 85
80## Steps that apply to all builds ## 86## Steps that apply to all builds
81 87
82Once you have a source tree, either by downloaded using git and having 88Once you have a source tree, either by downloaded using git and having
83run the `autogen.sh` script above, or by downloading a release distribution from 89run the `autogen.sh` script above, or by downloading a release distribution from
@@ -110,9 +116,9 @@ ninja
110ninja test 116ninja test
111``` 117```
112 118
113### OS specific build information: ### 119### OS specific build information
114 120
115#### HP-UX (11i) #### 121#### HP-UX (11i)
116 122
117Set the UNIX_STD environment variable to `2003` before running `configure` 123Set the UNIX_STD environment variable to `2003` before running `configure`
118in order to build with the HP C/aC++ compiler. See the "standards(5)" man 124in order to build with the HP C/aC++ compiler. See the "standards(5)" man
@@ -124,64 +130,70 @@ export UNIX_STD=2003
124make 130make
125``` 131```
126 132
127#### Windows - Mingw-w64 #### 133#### Windows - Mingw-w64
128 134
129LibreSSL builds against relatively recent versions of Mingw-w64, not to be 135LibreSSL builds against relatively recent versions of Mingw-w64, not to be
130confused with the original mingw.org project. Mingw-w64 3.2 or later 136confused with the original mingw.org project. Mingw-w64 3.2 or later
131should work. See README.windows for more information 137should work. See README.windows for more information
132 138
133#### Windows - Visual Studio #### 139#### Windows - Visual Studio
134 140
135LibreSSL builds using the CMake target "Visual Studio 12 2013" and newer. To 141LibreSSL builds using the CMake target "Visual Studio 12 2013" and newer. To
136generate a Visual Studio project, install CMake, enter the LibreSSL source 142generate a Visual Studio project, install CMake, enter the LibreSSL source
137directory and run: 143directory and run:
138 144
139```sh 145```sh
140 mkdir build-vs2013 146mkdir build-vs2013
141 cd build-vs2013 147cd build-vs2013
142 cmake -G"Visual Studio 12 2013" .. 148cmake -G"Visual Studio 12 2013" ..
143``` 149```
144 150
145Replace "Visual Studio 12 2013" with whatever version of Visual Studio you 151Replace "Visual Studio 12 2013" with whatever version of Visual Studio you
146have installed. This will generate a LibreSSL.sln file that you can incorporate 152have installed. This will generate a LibreSSL.sln file that you can incorporate
147into other projects or build by itself. 153into other projects or build by itself.
148 154
149#### Cmake - Additional Options #### 155#### CMake - Additional Options
150 156
151| Option Name | Default | Description 157| Option Name | Default | Description |
152| ------------ | -----: | ------ 158|-------------------------|--------:|-----------------------------------------------------------------------------------------------------------------|
153| LIBRESSL_SKIP_INSTALL | OFF | allows skipping install() rules. Can be specified from command line using <br>```-DLIBRESSL_SKIP_INSTALL=ON``` | 159| `LIBRESSL_SKIP_INSTALL` | `OFF` | allows skipping install() rules. Can be specified from command line using <br>```-DLIBRESSL_SKIP_INSTALL=ON``` |
154| LIBRESSL_APPS | ON | allows skipping application builds. Apps are required to run tests | 160| `LIBRESSL_APPS` | `ON` | allows skipping application builds. Apps are required to run tests |
155| LIBRESSL_TESTS | ON | allows skipping of tests. Tests are only available in static builds | 161| `LIBRESSL_TESTS` | `ON` | allows skipping of tests. Tests are only available in static builds |
156| BUILD_SHARED_LIBS | OFF | CMake option for building shared libraries. | 162| `BUILD_SHARED_LIBS` | `OFF` | CMake option for building shared libraries. |
157| ENABLE_ASM | ON | builds assembly optimized rules. | 163| `ENABLE_ASM` | `ON` | builds assembly optimized rules. |
158| ENABLE_EXTRATESTS | OFF | Enable extra tests that may be unreliable on some platforms | 164| `ENABLE_EXTRATESTS` | `OFF` | Enable extra tests that may be unreliable on some platforms |
159| ENABLE_NC | OFF | Enable installing TLS-enabled nc(1) | 165| `ENABLE_NC` | `OFF` | Enable installing TLS-enabled nc(1) |
160| OPENSSLDIR | Blank | Set the default openssl directory. Can be specified from command line using <br>```-DOPENSSLDIR=<dirname>``` | 166| `OPENSSLDIR` | Blank | Set the default openssl directory. Can be specified from command line using <br>```-DOPENSSLDIR=<dirname>``` |
161 167
162# Using LibreSSL # 168# Using LibreSSL
163 169
164## CMake ## 170## CMake
165 171
166Make a new folder in your project root (where your main CMakeLists.txt file is located) called CMake. Copy the FindLibreSSL.cmake file to that folder, and add the following line to your main CMakeLists.txt: 172Make a new folder in your project root (where your main `CMakeLists.txt` file is
173located) called CMake. Copy the `FindLibreSSL.cmake` file to that folder, and
174add the following line to your main `CMakeLists.txt`:
167 175
168```cmake 176```cmake
169set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}") 177set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
170``` 178```
171 179
172After your **add_executable** or **add_library** line in your CMakeLists.txt file add the following: 180After your `add_executable` or `add_library` line in your `CMakeLists.txt` file
181add the following:
173 182
174```cmake 183```cmake
175find_package(LibreSSL REQUIRED) 184find_package(LibreSSL REQUIRED)
176``` 185```
177 186
178It will tell CMake to find LibreSSL and if found will let you use the following 3 interfaces in your CMakeLists.txt file: 187It will tell CMake to find LibreSSL and if found will let you use the following
1883 interfaces in your `CMakeLists.txt` file:
179 189
180* LibreSSL::Crypto 190* LibreSSL::Crypto
181* LibreSSL::SSL 191* LibreSSL::SSL
182* LibreSSL::TLS 192* LibreSSL::TLS
183 193
184If you for example want to use the LibreSSL TLS library in your test program, include it like so (SSL and Crypto are required by TLS and included automatically too): 194If you for example want to use the LibreSSL TLS library in your test program,
195include it like so (SSL and Crypto are required by TLS and included
196automatically too):
185 197
186```cmake 198```cmake
187target_link_libraries(test LibreSSL::TLS) 199target_link_libraries(test LibreSSL::TLS)
@@ -203,10 +215,18 @@ find_package(LibreSSL REQUIRED)
203target_link_libraries(test LibreSSL::TLS) 215target_link_libraries(test LibreSSL::TLS)
204``` 216```
205 217
206#### Linux #### 218#### Linux
207 219
208Following the guide in the sections above to compile LibreSSL using make and running "sudo make install" will install LibreSSL to the /usr/local/ folder, and will found automatically by find_package. If your system installs it to another location or you have placed them yourself in a different location, you can set the CMake variable LIBRESSL_ROOT_DIR to the correct path, to help CMake find the library. 220Following the guide in the sections above to compile LibreSSL using make and
221running `sudo make install` will install LibreSSL to the `/usr/local/` folder,
222and will found automatically by find_package. If your system installs it to
223another location, or you have placed them yourself in a different location, you
224can set the CMake variable `LIBRESSL_ROOT_DIR` to the correct path, to help
225CMake find the library.
209 226
210#### Windows #### 227#### Windows
211 228
212Placing the library files in C:/Program Files/LibreSSL/lib and the include files in C:/Program Files/LibreSSL/include should let CMake find them automatically, but it is recommended that you use CMake-GUI to set the paths. It is more convenient as you can have the files in any folder you choose. 229Placing the library files in `C:/Program Files/LibreSSL/lib` and the include
230files in `C:/Program Files/LibreSSL/include` should let CMake find them
231automatically, but it is recommended that you use CMake-GUI to set the paths.
232It is more convenient as you can have the files in any folder you choose.