• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

apps/H03-May-2022-54,50445,193

crypto/H03-May-2022-340,334261,356

include/H03-May-2022-39,18225,564

m4/H03-May-2022-9,2158,308

man/H03-May-2022-117,914116,719

scripts/H03-May-2022-3,4563,072

ssl/H03-May-2022-44,65731,148

tests/H03-May-2022-42,77434,121

tls/H03-May-2022-5,8774,541

COPYINGH A D14-Nov-20176.3 KiB134124

ChangeLogH A D13-Mar-202274.8 KiB2,1601,410

FindLibreSSL.cmakeH A D28-Sep-20216.2 KiB228180

INSTALLH A D10-Sep-201515.4 KiB371289

Makefile.amH A D01-Oct-20211.2 KiB4640

Makefile.am.commonH A D28-Sep-2021162 43

Makefile.inH A D03-May-202229.3 KiB923822

README.mdH A D04-Oct-20218.4 KiB209150

README.windowsH A D28-Sep-20212.8 KiB6650

VERSIONH A D13-Mar-20227 31

aclocal.m4H A D13-Mar-202242.1 KiB1,1641,056

cert.pemH A D18-Feb-2022308.4 KiB5,9515,751

cmake_export_symbol.cmakeH A D28-Sep-20212.3 KiB5749

cmake_uninstall.cmake.inH A D28-Sep-20211,007 2220

compileH A D13-Mar-20227.2 KiB349259

configH A D23-Apr-2019398 189

config.guessH A D13-Mar-202242.6 KiB1,4481,255

config.subH A D13-Mar-202235.3 KiB1,8141,676

configureH A D03-May-2022476.4 KiB16,61913,959

configure.acH A D13-Mar-20224.5 KiB144119

depcompH A D13-Mar-202223 KiB792502

install-shH A D13-Mar-202215 KiB542352

libcrypto.pc.inH A D04-Oct-2021294 1411

libssl.pc.inH A D04-Oct-2021293 1411

libtls.pc.inH A D04-Oct-2021308 1411

ltmain.shH A D13-Mar-2022276 KiB9,6317,280

missingH A D13-Mar-20226.7 KiB216143

openssl.cnfH A D03-Sep-2016745 2522

openssl.pc.inH A D19-Jul-2015248 129

tap-driver.shH A D13-Mar-202219 KiB652529

test-driverH A D13-Mar-20224.6 KiB15188

x509v3.cnfH A D03-Sep-20161,006 3026

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