|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| apps/ | H | 03-May-2022 | - | 54,504 | 45,193 |
| crypto/ | H | 03-May-2022 | - | 340,334 | 261,356 |
| include/ | H | 03-May-2022 | - | 39,182 | 25,564 |
| m4/ | H | 03-May-2022 | - | 9,215 | 8,308 |
| man/ | H | 03-May-2022 | - | 117,914 | 116,719 |
| scripts/ | H | 03-May-2022 | - | 3,456 | 3,072 |
| ssl/ | H | 03-May-2022 | - | 44,657 | 31,148 |
| tests/ | H | 03-May-2022 | - | 42,774 | 34,121 |
| tls/ | H | 03-May-2022 | - | 5,877 | 4,541 |
| COPYING | H A D | 14-Nov-2017 | 6.3 KiB | 134 | 124 |
| ChangeLog | H A D | 13-Mar-2022 | 74.8 KiB | 2,160 | 1,410 |
| FindLibreSSL.cmake | H A D | 28-Sep-2021 | 6.2 KiB | 228 | 180 |
| INSTALL | H A D | 10-Sep-2015 | 15.4 KiB | 371 | 289 |
| Makefile.am | H A D | 01-Oct-2021 | 1.2 KiB | 46 | 40 |
| Makefile.am.common | H A D | 28-Sep-2021 | 162 | 4 | 3 |
| Makefile.in | H A D | 03-May-2022 | 29.3 KiB | 923 | 822 |
| README.md | H A D | 04-Oct-2021 | 8.4 KiB | 209 | 150 |
| README.windows | H A D | 28-Sep-2021 | 2.8 KiB | 66 | 50 |
| VERSION | H A D | 13-Mar-2022 | 7 | 3 | 1 |
| aclocal.m4 | H A D | 13-Mar-2022 | 42.1 KiB | 1,164 | 1,056 |
| cert.pem | H A D | 18-Feb-2022 | 308.4 KiB | 5,951 | 5,751 |
| cmake_export_symbol.cmake | H A D | 28-Sep-2021 | 2.3 KiB | 57 | 49 |
| cmake_uninstall.cmake.in | H A D | 28-Sep-2021 | 1,007 | 22 | 20 |
| compile | H A D | 13-Mar-2022 | 7.2 KiB | 349 | 259 |
| config | H A D | 23-Apr-2019 | 398 | 18 | 9 |
| config.guess | H A D | 13-Mar-2022 | 42.6 KiB | 1,448 | 1,255 |
| config.sub | H A D | 13-Mar-2022 | 35.3 KiB | 1,814 | 1,676 |
| configure | H A D | 03-May-2022 | 476.4 KiB | 16,619 | 13,959 |
| configure.ac | H A D | 13-Mar-2022 | 4.5 KiB | 144 | 119 |
| depcomp | H A D | 13-Mar-2022 | 23 KiB | 792 | 502 |
| install-sh | H A D | 13-Mar-2022 | 15 KiB | 542 | 352 |
| libcrypto.pc.in | H A D | 04-Oct-2021 | 294 | 14 | 11 |
| libssl.pc.in | H A D | 04-Oct-2021 | 293 | 14 | 11 |
| libtls.pc.in | H A D | 04-Oct-2021 | 308 | 14 | 11 |
| ltmain.sh | H A D | 13-Mar-2022 | 276 KiB | 9,631 | 7,280 |
| missing | H A D | 13-Mar-2022 | 6.7 KiB | 216 | 143 |
| openssl.cnf | H A D | 03-Sep-2016 | 745 | 25 | 22 |
| openssl.pc.in | H A D | 19-Jul-2015 | 248 | 12 | 9 |
| tap-driver.sh | H A D | 13-Mar-2022 | 19 KiB | 652 | 529 |
| test-driver | H A D | 13-Mar-2022 | 4.6 KiB | 151 | 88 |
| x509v3.cnf | H A D | 03-Sep-2016 | 1,006 | 30 | 26 |
README.md
1![LibreSSL image](https://www.libressl.org/images/libressl.jpg)
2## Official portable version of [LibreSSL](https://www.libressl.org) ##
3
4[![Linux Build Status](https://github.com/libressl-portable/portable/actions/workflows/linux_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/linux_test.yml)
5[![macOS Build Status](https://github.com/libressl-portable/portable/actions/workflows/macos_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/macos_test.yml)
6[![Android_Build Status](https://github.com/libressl-portable/portable/actions/workflows/android_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/android_test.yml)
7[![Cross_Build Status](https://github.com/libressl-portable/portable/actions/workflows/cross_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/cross_test.yml)
8[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libressl.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libressl)
9
10LibreSSL is a fork of [OpenSSL](https://www.openssl.org) 1.0.1g developed by the
11[OpenBSD](https://www.openbsd.org) project. Our goal is to modernize the codebase,
12improve security, and apply best practice development processes from OpenBSD.
13
14## Compatibility with OpenSSL: ##
15
16LibreSSL is API compatible with OpenSSL 1.0.1, but does not yet include all
17new APIs from OpenSSL 1.0.2 and later. LibreSSL also includes APIs not yet
18present in OpenSSL. The current common API subset is OpenSSL 1.0.1.
19
20LibreSSL is not ABI compatible with any release of OpenSSL, or necessarily
21earlier releases of LibreSSL. You will need to relink your programs to
22LibreSSL in order to use it, just as in moving between major versions of OpenSSL.
23LibreSSL's installed library version numbers are incremented to account for
24ABI and API changes.
25
26## Compatibility with other operating systems: ##
27
28While primarily developed on and taking advantage of APIs available on OpenBSD,
29the LibreSSL portable project attempts to provide working alternatives for
30other operating systems, and assists with improving OS-native implementations
31where possible.
32
33At the time of this writing, LibreSSL is known to build and work on:
34
35* Linux (kernel 3.17 or later recommended)
36* FreeBSD (tested with 9.2 and later)
37* NetBSD (7.0 or later recommended)
38* HP-UX (11i)
39* Solaris (11 and later preferred)
40* Mac OS X (tested with 10.8 and later)
41* AIX (5.3 and later)
42
43LibreSSL also supports the following Windows environments:
44* Microsoft Windows (Windows 7 / Windows Server 2008r2 or later, x86 and x64)
45* Wine (32-bit and 64-bit)
46* Mingw-w64, Cygwin, and Visual Studio
47
48Official release tarballs are available at your friendly neighborhood
49OpenBSD mirror in directory
50[LibreSSL](https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/),
51although we suggest that you use a [mirror](https://www.openbsd.org/ftp.html).
52
53The LibreSSL portable build framework is also
54[mirrored](https://github.com/libressl-portable/portable) in Github.
55
56Please report bugs either to the public libressl@openbsd.org mailing list,
57or to the github
58[issue tracker](https://github.com/libressl-portable/portable/issues)
59
60Severe vulnerabilities or bugs requiring coordination with OpenSSL can be
61sent to the core team at libressl-security@openbsd.org.
62
63# Building LibreSSL #
64
65## Prerequisites when building from a Git checkout ##
66
67If you have checked this source using Git, or have downloaded a source tarball
68from Github, follow these initial steps to prepare the source tree for
69building. _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._
70
711. Ensure you have the following packages installed:
72 automake, autoconf, git, libtool, perl
732. Run `./autogen.sh` to prepare the source tree for building or
74 run `./dist.sh` to prepare a tarball.
75
76## Steps that apply to all builds ##
77
78Once you have a source tree, either by downloaded using git and having
79run the `autogen.sh` script above, or by downloading a release distribution from
80an OpenBSD mirror, run these commands to build and install the package on most
81systems:
82
83```sh
84./configure # see ./configure --help for configuration options
85make check # runs builtin unit tests
86make install # set DESTDIR= to install to an alternate location
87```
88
89If you wish to use the CMake build system, use these commands:
90
91```sh
92mkdir build
93cd build
94cmake ..
95make
96make test
97```
98
99For faster builds, you can use Ninja as well:
100
101```sh
102mkdir build-ninja
103cd build-ninja
104cmake -G"Ninja" ..
105ninja
106ninja test
107```
108
109### OS specific build information: ###
110
111#### HP-UX (11i) ####
112
113Set the UNIX_STD environment variable to `2003` before running `configure`
114in order to build with the HP C/aC++ compiler. See the "standards(5)" man
115page for more details.
116
117```sh
118export UNIX_STD=2003
119./configure
120make
121```
122
123#### Windows - Mingw-w64 ####
124
125LibreSSL builds against relatively recent versions of Mingw-w64, not to be
126confused with the original mingw.org project. Mingw-w64 3.2 or later
127should work. See README.windows for more information
128
129#### Windows - Visual Studio ####
130
131LibreSSL builds using the CMake target "Visual Studio 12 2013" and newer. To
132generate a Visual Studio project, install CMake, enter the LibreSSL source
133directory and run:
134
135```sh
136 mkdir build-vs2013
137 cd build-vs2013
138 cmake -G"Visual Studio 12 2013" ..
139```
140
141Replace "Visual Studio 12 2013" with whatever version of Visual Studio you
142have installed. This will generate a LibreSSL.sln file that you can incorporate
143into other projects or build by itself.
144
145#### Cmake - Additional Options ####
146
147| Option Name | Default | Description
148| ------------ | -----: | ------
149| LIBRESSL_SKIP_INSTALL | OFF | allows skipping install() rules. Can be specified from command line using <br>```-DLIBRESSL_SKIP_INSTALL=ON``` |
150| LIBRESSL_APPS | ON | allows skipping application builds. Apps are required to run tests |
151| LIBRESSL_TESTS | ON | allows skipping of tests. Tests are only available in static builds |
152| BUILD_SHARED_LIBS | OFF | CMake option for building shared libraries. |
153| ENABLE_ASM | ON | builds assembly optimized rules. |
154| ENABLE_EXTRATESTS | OFF | Enable extra tests that may be unreliable on some platforms |
155| ENABLE_NC | OFF | Enable installing TLS-enabled nc(1) |
156| OPENSSLDIR | Blank | Set the default openssl directory. Can be specified from command line using <br>```-DOPENSSLDIR=<dirname>``` |
157
158# Using LibreSSL #
159
160## CMake ##
161
162Make 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:
163
164```cmake
165set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
166```
167
168After your **add_executable** or **add_library** line in your CMakeLists.txt file add the following:
169
170```cmake
171find_package(LibreSSL REQUIRED)
172```
173
174It will tell CMake to find LibreSSL and if found will let you use the following 3 interfaces in your CMakeLists.txt file:
175
176* LibreSSL::Crypto
177* LibreSSL::SSL
178* LibreSSL::TLS
179
180If you for example want to use the LibreSSL TLS library in your test program, include it like so (SSL and Cryto are required by TLS and included automatically too):
181
182```cmake
183target_link_libraries(test LibreSSL::TLS)
184```
185
186Full example:
187
188```cmake
189cmake_minimum_required(VERSION 3.10.0)
190
191set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
192
193project(test)
194
195add_executable(test Main.cpp)
196
197find_package(LibreSSL REQUIRED)
198
199target_link_libraries(test LibreSSL::TLS)
200```
201
202#### Linux ####
203
204Following 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.
205
206#### Windows ####
207
208Placing 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.
209
README.windows
1# Building
2
3For Windows systems, LibreSSL supports the mingw-w64 toolchain, which can use
4GCC or Clang as the compiler. Contrary to its name, mingw-w64 supports both
532-bit and 64-bit build environments. If your project already uses mingw-w64,
6then LibreSSL should integrate very nicely. Old versions of the mingw-w64
7toolchain, such as the one packaged with Ubuntu 12.04, may have trouble
8building LibreSSL. Please try it with a recent toolchain if you encounter
9troubles. Cygwin provides an easy method of installing the latest mingw-w64
10cross compilers on Windows.
11
12To configure and build LibreSSL for a 32-bit system, use the following
13build steps:
14
15 CC=i686-w64-mingw32-gcc CPPFLAGS=-D__MINGW_USE_VC2005_COMPAT \
16 ./configure --host=i686-w64-mingw32
17 make
18 make check
19
20For 64-bit builds, use these instead:
21
22 CC=x86_64-w64-mingw32-gcc ./configure --host=x86_64-w64-mingw32
23 make
24 make check
25
26# Why the -D__MINGW_USE_VC2005_COMPAT flag on 32-bit systems?
27
28An ABI change introduced with Microsoft Visual C++ 2005 (also known as
29Visual C++ 8.0) switched time_t from 32-bit to 64-bit. It is important to
30build LibreSSL with 64-bit time_t whenever possible, because 32-bit time_t
31is unable to represent times past 2038 (this is commonly known as the
32Y2K38 problem).
33
34If LibreSSL is built with 32-bit time_t, when verifying a certificate whose
35expiry date is set past 19 January 2038, it will be unable to tell if the
36certificate has expired or not, and thus take the safe stance and reject it.
37
38In order to avoid this, you need to build LibreSSL (and everything that links
39with it) with the -D__MINGW_USE_VC2005_COMPAT flag. This tells mingw-w64 to
40use the new ABI.
41
4264-bit systems always have a 64-bit time_t and are not affected by this
43problem.
44
45# Using Libressl with Visual Studio
46
47A script for generating ready-to-use .DLL and static .LIB files is included in
48the source repository at
49https://github.com/libressl-portable/portable/blob/master/dist-win.sh
50
51This script uses mingw-w64 to build LibreSSL and then uses Visual Studio tools
52to generate compatible library import files ready-to-use with Visual
53Studio projects. Static and dynamic libraries are included. The script uses
54cv2pdb to generate Visual Studio and windbg compatible debug files. cv2pdb is a
55tool developed for the D language and can be found here:
56https://github.com/rainers/cv2pdb
57
58Pre-built Windows binaries are available with LibreSSL releases if you do not
59have a mingw-w64 build environment. Mingw-w64 code is largely, but not 100%,
60compatible with code built from Visual Studio. Notably, FILE * pointers cannot
61be shared between code built for Mingw-w64 and Visual Studio.
62
63As of LibreSSL 2.2.2, Visual Studio Native builds can be produced using CMake.
64This produces ABI-compatible libraries for linking with native code generated
65by Visual Studio.
66