Skip to content
LibreSSL Portable itself. This includes the build scaffold and compatibility layer that builds portable LibreSSL from the OpenBSD source code. Pull requests or patches sent to are welcome.
C CMake Makefile Shell M4 Batchfile
Branch: master
Clone or download


Type Name Latest commit message Commit time
Failed to load latest commit information.
apps Install ocspcheck.8 manual Jan 9, 2020
crypto Fix cmake build to enable masm with VS2019 May 9, 2020
include include <windows.h> Apr 15, 2020
libtls-standalone Portable code part for callbacks in accept/connect Jun 28, 2016
m4 initial support for midipix Oct 20, 2019
man add new manpages May 26, 2020
patches Fix patch for tests/tlsexttest.c May 12, 2020
scripts Fix android build Mar 26, 2020
ssl remove d1_enc.c Mar 14, 2020
tests Build regress servertest only if non BUILD_SHARED_LIBS with cmake May 18, 2020
tls TLS target properties when building static libs Mar 2, 2020
.gitignore Add regress bn_to_string Jun 13, 2019
.travis.yml Add android 10 build Mar 26, 2020
CMakeLists.txt [CMakeLists.txt] Move `project` below `cmake_minimum_required`; fix i… May 23, 2020
ChangeLog Add non-expired certificates fix to ChangeLog. May 31, 2020
FindLibreSSL.cmake Include FindPackageHandleStandardArgs before use. Dec 19, 2019 Add configure option to disable tests May 1, 2020 disable symbol hiding for now Nov 5, 2016
OPENBSD_BRANCH tie master libressl branch to openbsd master Aug 1, 2014 Add OSS-Fuzz fuzzing badge Oct 8, 2019 Document 32-bit time_t problem on minw-w64 toolchain and how to avoid it Feb 15, 2017
appveyor.yml more MSVC build/test tweaks May 1, 2020 -path isn't really needed for perms fixup, and not supported everywhere Jan 4, 2016 Add *.5 manpages in libcrypto/man/ Sep 10, 2017
cmake_export_symbol.cmake Use binary directory for symbol exports generation Mar 16, 2018 add cmake uninstall functionality Apr 9, 2016
config Add an OpenSSL compatible ./config wrapper Oct 31, 2014 improved default help value May 2, 2020 set windows binary OPENSSLDIR to something plausible Mar 21, 2016 Add *.5 manpages in libcrypto/man/ Sep 10, 2017 add branch coverage, skip coverage check of tests themselves May 7, 2015 add openbsd tag sync script + release verifier Sep 10, 2015 Fix pkg-config metadata for libcrypto Apr 17, 2017 update public signify key Apr 9, 2020 pc: add platform-specific libs to Libs.private May 31, 2016 pc: add platform-specific libs to Libs.private May 31, 2016 add platform libraries to libcompat's LIBADD list Jul 12, 2014 [CMakeLists.txt] Move `project` below `cmake_minimum_required`; fix i… May 23, 2020 add cms.h to public headers Sep 10, 2019

LibreSSL image

Official portable version of LibreSSL

Build Status Fuzzing Status

LibreSSL is a fork of OpenSSL 1.0.1g developed by the OpenBSD project. Our goal is to modernize the codebase, improve security, and apply best practice development processes from OpenBSD.

Compatibility with OpenSSL:

LibreSSL is API compatible with OpenSSL 1.0.1, but does not yet include all new APIs from OpenSSL 1.0.2 and later. LibreSSL also includes APIs not yet present in OpenSSL. The current common API subset is OpenSSL 1.0.1.

LibreSSL is not ABI compatible with any release of OpenSSL, or necessarily earlier releases of LibreSSL. You will need to relink your programs to LibreSSL in order to use it, just as in moving between major versions of OpenSSL. LibreSSL's installed library version numbers are incremented to account for ABI and API changes.

Compatibility with other operating systems:

While primarily developed on and taking advantage of APIs available on OpenBSD, the LibreSSL portable project attempts to provide working alternatives for other operating systems, and assists with improving OS-native implementations where possible.

At the time of this writing, LibreSSL is know to build and work on:

  • Linux (kernel 3.17 or later recommended)
  • FreeBSD (tested with 9.2 and later)
  • NetBSD (7.0 or later recommended)
  • HP-UX (11i)
  • Solaris (11 and later preferred)
  • Mac OS X (tested with 10.8 and later)
  • AIX (5.3 and later)

LibreSSL also supports the following Windows environments:

  • Microsoft Windows (Vista or higher, x86 and x64)
  • Wine (32-bit and 64-bit)
  • Builds with Mingw-w64, Cygwin, and Visual Studio

Official release tarballs are available at your friendly neighborhood OpenBSD mirror in directory LibreSSL, although we suggest that you use a mirror.

The LibreSSL portable build framework is also mirrored in Github.

Please report bugs either to the public mailing list, or to the github issue tracker

Severe vulnerabilities or bugs requiring coordination with OpenSSL can be sent to the core team at

Building LibreSSL

Prerequisites when building from a Git checkout

If you have checked this source using Git, or have downloaded a source tarball from Github, follow these initial steps to prepare the source tree for building. 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 instead. Using official releases is strongly advised if you are not a developer.

  1. Ensure you have the following packages installed: automake, autoconf, git, libtool, perl
  2. Run ./ to prepare the source tree for building or run ./ to prepare a tarball.

Steps that apply to all builds

Once you have a source tree, either by downloaded using git and having run the script above, or by downloading a release distribution from an OpenBSD mirror, run these commands to build and install the package on most systems:

./configure   # see ./configure --help for configuration options
make check    # runs builtin unit tests
make install  # set DESTDIR= to install to an alternate location

If you wish to use the CMake build system, use these commands:

mkdir build
cd build
cmake ..
make test

For faster builds, you can use Ninja as well:

mkdir build-ninja
cd build-ninja
cmake -G"Ninja" ..
ninja test

OS specific build information:

HP-UX (11i)

Set the UNIX_STD environment variable to 2003 before running configure in order to build with the HP C/aC++ compiler. See the "standards(5)" man page for more details.

export UNIX_STD=2003

Windows - Mingw-w64

LibreSSL builds against relatively recent versions of Mingw-w64, not to be confused with the original project. Mingw-w64 3.2 or later should work. See for more information

Windows - Visual Studio

LibreSSL builds using the CMake target "Visual Studio 12 2013" and newer. To generate a Visual Studio project, install CMake, enter the LibreSSL source directory and run:

 mkdir build-vs2013
 cd build-vs2013
 cmake -G"Visual Studio 12 2013" ..

Replace "Visual Studion 12 2013" with whatever version of Visual Studio you have installed. This will generate a LibreSSL.sln file that you can incorporate into other projects or build by itself.

Cmake - Additional Options

Option Name Default Description
LIBRESSL_SKIP_INSTALL OFF allows skipping install() rules. Can be specified from command line using
LIBRESSL_APPS ON allows skipping application builds. Apps are required to run tests
LIBRESSL_TESTS ON allows skipping of tests. Tests are only available in static builds
BUILD_SHARED_LIBS OFF CMake option for building shared libraries.
ENABLE_ASM ON builds assembly optimized rules.
ENABLE_EXTRATESTS OFF Enable extra tests that may be unreliable on some platforms
ENABLE_NC OFF Enable installing TLS-enabled nc(1)
OPENSSLDIR Blank Set the default openssl directory. Can be specified from command line using

Using LibreSSL


Make 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:


After your add_executable or add_library line in your CMakeLists.txt file add the following:

find_package(LibreSSL REQUIRED)

It will tell CMake to find LibreSSL and if found will let you use the following 3 interfaces in your CMakeLists.txt file:

  • LibreSSL::Crypto
  • LibreSSL::SSL
  • LibreSSL::TLS

If 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):

target_link_libraries(test LibreSSL::TLS)

Full example:

cmake_minimum_required(VERSION 3.10.0)



add_executable(test Main.cpp)

find_package(LibreSSL REQUIRED)

target_link_libraries(test LibreSSL::TLS)


Following 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.


Placing 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.

You can’t perform that action at this time.