Jun's Blog

Output, activities, memo and etc.

Install LibreSSL on Fedora

I am working for Ruby OpenSSL library and OpenSSL. and Ruby OpenSSL Library's repository supports both OpenSSL and LibreSSL that is a fork from OpenSSL. It seems that LibreSSL is mainly used in *BSD. To fix LibreSSL related issues, I need to install LibreSSL on my local machine, Fedora Linux.

So, here is my log to install LibreSSL on Fedora. It seems that the source code is https://github.com/libressl/portable, because the "For other systems" - "Development" links to the repository page.

$ cat /etc/fedora-release 
Fedora release 38 (Thirty Eight)

$ rpm -q gcc
gcc-13.1.1-4.fc38.x86_64

$ mkdir ~/git/libressl

$ cd ~/git/libressl

$ git clone https://github.com/libressl/portable.git

$ cd portable

I needed to install the libtool to run the ./autogen.sh in a later process.

$ sudo dnf install libtool

I install LibreSSL master branch.

$ git branch
* master

I got the commit hash by the followings. It is used in a part of the installed prefix directory.

$ git rev-parse --short HEAD
6650dce
$ git log --abbrev-commit --pretty=oneline | head -1
6650dce rmdconst.h was removed

I installed like this.

$ ./autogen.sh

$ ./configure --prefix=HOME/.local/libressl-6650dce

$ make -j$(nproc)

$ make install_sw

I printed the LibreSSL version like this.

$ LD_LIBRARY_PATH=/home/jaruga/.local/libressl-6650dce/lib/ \
  /home/jaruga/.openssl/local-6650dce/bin/openssl version
LibreSSL 3.8.1

The --help option printed the available options.

$ LD_LIBRARY_PATH=/home/jaruga/.local/libressl-6650dce/lib/ \
  /home/jaruga/.openssl/libressl-6650dce/bin/local version --help
unknown option '--help'
usage: version [-abdfpv]
 -a                 All information (same as setting all other flags)
 -b                 Date the current version of OpenSSL was built
 -d                 OPENSSLDIR value
 -f                 Compilation flags
 -p                 Platform settings
 -v                 Current OpenSSL version

Here is how to print all the version information.

$ LD_LIBRARY_PATH=/home/jaruga/.local/libressl-6650dce/lib/ \
  /home/jaruga/.local/libressl-6650dce/bin/openssl version -a
LibreSSL 3.8.1
built on: date not available
platform: information not available
compiler: information not available
OPENSSLDIR: "/home/jaruga/.local/libressl-6650dce/etc/ssl"