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

..03-May-2022-

apps/H03-May-2022-54,15344,870

crypto/H03-May-2022-337,286259,053

include/H03-May-2022-39,10825,464

m4/H03-May-2022-9,2138,306

man/H03-May-2022-112,047110,875

scripts/H03-May-2022-3,4713,089

ssl/H03-May-2022-44,03930,851

tests/H03-May-2022-38,78830,699

tls/H03-May-2022-5,8644,535

COPYINGH A D14-Nov-20176.3 KiB134124

ChangeLogH A D01-Oct-202172 KiB2,0931,353

FindLibreSSL.cmakeH A D28-Sep-20216.2 KiB228180

INSTALLH A D10-Sep-201515.4 KiB371289

Makefile.amH A D30-Sep-20211.2 KiB4640

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

Makefile.inH A D03-May-202229.3 KiB923822

README.mdH A D30-Sep-20217.8 KiB205146

README.windowsH A D28-Sep-20212.8 KiB6650

VERSIONH A D01-Oct-20217 31

aclocal.m4H A D01-Oct-202142.1 KiB1,1641,056

cert.pemH A D01-Oct-2021325.7 KiB6,2646,050

cmake_export_symbol.cmakeH A D28-Sep-20212.3 KiB5749

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

compileH A D01-Oct-20217.2 KiB349259

configH A D23-Apr-2019398 189

config.guessH A D01-Oct-202142.6 KiB1,4481,255

config.subH A D01-Oct-202135.3 KiB1,8141,676

configureH A D03-May-2022476.3 KiB16,61513,957

configure.acH A D30-Sep-20214.5 KiB144119

depcompH A D01-Oct-202123 KiB792502

install-shH A D01-Oct-202115 KiB542352

libcrypto.pc.inH A D28-Sep-2021315 1613

libssl.pc.inH A D28-Sep-2021361 1714

libtls.pc.inH A D28-Sep-2021329 1613

ltmain.shH A D01-Oct-2021276 KiB9,6317,280

missingH A D01-Oct-20216.7 KiB216143

openssl.cnfH A D03-Sep-2016745 2522

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

tap-driver.shH A D01-Oct-202119 KiB652529

test-driverH A D01-Oct-20214.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[![Build Status](https://travis-ci.org/libressl-portable/portable.svg?branch=master)](https://travis-ci.org/libressl-portable/portable) [![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)
5
6LibreSSL is a fork of [OpenSSL](https://www.openssl.org) 1.0.1g developed by the
7[OpenBSD](https://www.openbsd.org) project.  Our goal is to modernize the codebase,
8improve security, and apply best practice development processes from OpenBSD.
9
10## Compatibility with OpenSSL: ##
11
12LibreSSL is API compatible with OpenSSL 1.0.1, but does not yet include all
13new APIs from OpenSSL 1.0.2 and later. LibreSSL also includes APIs not yet
14present in OpenSSL. The current common API subset is OpenSSL 1.0.1.
15
16LibreSSL is not ABI compatible with any release of OpenSSL, or necessarily
17earlier releases of LibreSSL. You will need to relink your programs to
18LibreSSL in order to use it, just as in moving between major versions of OpenSSL.
19LibreSSL's installed library version numbers are incremented to account for
20ABI and API changes.
21
22## Compatibility with other operating systems: ##
23
24While primarily developed on and taking advantage of APIs available on OpenBSD,
25the LibreSSL portable project attempts to provide working alternatives for
26other operating systems, and assists with improving OS-native implementations
27where possible.
28
29At the time of this writing, LibreSSL is known to build and work on:
30
31* Linux (kernel 3.17 or later recommended)
32* FreeBSD (tested with 9.2 and later)
33* NetBSD (7.0 or later recommended)
34* HP-UX (11i)
35* Solaris (11 and later preferred)
36* Mac OS X (tested with 10.8 and later)
37* AIX (5.3 and later)
38
39LibreSSL also supports the following Windows environments:
40* Microsoft Windows (Windows 7 / Windows Server 2008r2 or later, x86 and x64)
41* Wine (32-bit and 64-bit)
42* Mingw-w64, Cygwin, and Visual Studio
43
44Official release tarballs are available at your friendly neighborhood
45OpenBSD mirror in directory
46[LibreSSL](https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/),
47although we suggest that you use a [mirror](https://www.openbsd.org/ftp.html).
48
49The LibreSSL portable build framework is also
50[mirrored](https://github.com/libressl-portable/portable) in Github.
51
52Please report bugs either to the public libressl@openbsd.org mailing list,
53or to the github
54[issue tracker](https://github.com/libressl-portable/portable/issues)
55
56Severe vulnerabilities or bugs requiring coordination with OpenSSL can be
57sent to the core team at libressl-security@openbsd.org.
58
59# Building LibreSSL #
60
61## Prerequisites when building from a Git checkout ##
62
63If you have checked this source using Git, or have downloaded a source tarball
64from Github, follow these initial steps to prepare the source tree for
65building. _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._
66
671. Ensure you have the following packages installed:
68   automake, autoconf, git, libtool, perl
692. Run `./autogen.sh` to prepare the source tree for building or
70   run `./dist.sh` to prepare a tarball.
71
72## Steps that apply to all builds ##
73
74Once you have a source tree, either by downloaded using git and having
75run the `autogen.sh` script above, or by downloading a release distribution from
76an OpenBSD mirror, run these commands to build and install the package on most
77systems:
78
79```sh
80./configure   # see ./configure --help for configuration options
81make check    # runs builtin unit tests
82make install  # set DESTDIR= to install to an alternate location
83```
84
85If you wish to use the CMake build system, use these commands:
86
87```sh
88mkdir build
89cd build
90cmake ..
91make
92make test
93```
94
95For faster builds, you can use Ninja as well:
96
97```sh
98mkdir build-ninja
99cd build-ninja
100cmake -G"Ninja" ..
101ninja
102ninja test
103```
104
105### OS specific build information: ###
106
107#### HP-UX (11i) ####
108
109Set the UNIX_STD environment variable to `2003` before running `configure`
110in order to build with the HP C/aC++ compiler. See the "standards(5)" man
111page for more details.
112
113```sh
114export UNIX_STD=2003
115./configure
116make
117```
118
119#### Windows - Mingw-w64 ####
120
121LibreSSL builds against relatively recent versions of Mingw-w64, not to be
122confused with the original mingw.org project.  Mingw-w64 3.2 or later
123should work. See README.windows for more information
124
125#### Windows - Visual Studio ####
126
127LibreSSL builds using the CMake target "Visual Studio 12 2013" and newer. To
128generate a Visual Studio project, install CMake, enter the LibreSSL source
129directory and run:
130
131```sh
132 mkdir build-vs2013
133 cd build-vs2013
134 cmake -G"Visual Studio 12 2013" ..
135```
136
137Replace "Visual Studio 12 2013" with whatever version of Visual Studio you
138have installed. This will generate a LibreSSL.sln file that you can incorporate
139into other projects or build by itself.
140
141#### Cmake - Additional Options ####
142
143| Option Name | Default | Description
144| ------------ | -----: | ------
145|  LIBRESSL_SKIP_INSTALL | OFF | allows skipping install() rules.  Can be specified from command line using <br>```-DLIBRESSL_SKIP_INSTALL=ON``` |
146|  LIBRESSL_APPS | ON | allows skipping application builds. Apps are required to run tests |
147|  LIBRESSL_TESTS | ON | allows skipping of tests. Tests are only available in static builds |
148|  BUILD_SHARED_LIBS | OFF | CMake option for building shared libraries. |
149|  ENABLE_ASM | ON | builds assembly optimized rules. |
150|  ENABLE_EXTRATESTS | OFF | Enable extra tests that may be unreliable on some platforms |
151|  ENABLE_NC | OFF | Enable installing TLS-enabled nc(1) |
152|  OPENSSLDIR | Blank | Set the default openssl directory.  Can be specified from command line using <br>```-DOPENSSLDIR=<dirname>``` |
153
154# Using LibreSSL #
155
156## CMake ##
157
158Make 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:
159
160```cmake
161set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
162```
163
164After your **add_executable** or **add_library** line in your CMakeLists.txt file add the following:
165
166```cmake
167find_package(LibreSSL REQUIRED)
168```
169
170It will tell CMake to find LibreSSL and if found will let you use the following 3 interfaces in your CMakeLists.txt file:
171
172* LibreSSL::Crypto
173* LibreSSL::SSL
174* LibreSSL::TLS
175
176If 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):
177
178```cmake
179target_link_libraries(test LibreSSL::TLS)
180```
181
182Full example:
183
184```cmake
185cmake_minimum_required(VERSION 3.10.0)
186
187set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
188
189project(test)
190
191add_executable(test Main.cpp)
192
193find_package(LibreSSL REQUIRED)
194
195target_link_libraries(test LibreSSL::TLS)
196```
197
198#### Linux ####
199
200Following 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.
201
202#### Windows ####
203
204Placing 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.
205

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