Skip to content

Commit aa7d3cf

Browse files
committed
T9040: Build FIPS-compliant OpenSSL version
Build FIPS-compatible OpenSSL binaries The FIPS provider does not get built and installed automatically. To enable it, you need to configure OpenSSL using the `enable-fips` option.
1 parent b526425 commit aa7d3cf

4 files changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/openssl/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../build.py
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[[packages]]
2+
name = "openssl"
3+
commit_id = "debian/openssl-3.0.20-1_deb12u2"
4+
scm_url = "https://salsa.debian.org/debian/openssl.git"
5+
build_cmd = "dpkg-buildpackage -us -uc -tc -b"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 361b8051af88376d3667ee087f31a0de75fe276e Mon Sep 17 00:00:00 2001
2+
From: Viacheslav Hletenko <v.gletenko@vyos.io>
3+
Date: Wed, 1 Jul 2026 16:32:31 +0000
4+
Subject: [PATCH] Enable FIPS module
5+
6+
---
7+
debian/openssl.install | 1 +
8+
debian/rules | 4 +++-
9+
2 files changed, 4 insertions(+), 1 deletion(-)
10+
11+
diff --git a/debian/openssl.install b/debian/openssl.install
12+
index 1f270a762a..44444be066 100644
13+
--- a/debian/openssl.install
14+
+++ b/debian/openssl.install
15+
@@ -5,6 +5,7 @@ usr/lib/ssl/certs
16+
usr/lib/ssl/private
17+
usr/lib/ssl/misc/*
18+
usr/lib/ssl/openssl.cnf
19+
+usr/lib/ssl/fipsmodule.cnf
20+
usr/share/man/man1/*
21+
usr/share/man/man5/*
22+
usr/share/man/man7/*
23+
diff --git a/debian/rules b/debian/rules
24+
index 4e260eedf2..54d6db4513 100755
25+
--- a/debian/rules
26+
+++ b/debian/rules
27+
@@ -29,7 +29,7 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
28+
MAKEFLAGS += -j$(NUMJOBS)
29+
endif
30+
31+
-CONFARGS = --prefix=/usr --openssldir=/usr/lib/ssl --libdir=lib/$(DEB_HOST_MULTIARCH) no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms no-capieng no-rdrand
32+
+CONFARGS = --prefix=/usr --openssldir=/usr/lib/ssl --libdir=lib/$(DEB_HOST_MULTIARCH) no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms no-capieng no-rdrand enable-fips
33+
#OPT_alpha = ev4 ev5
34+
ARCHOPTS = OPT_$(DEB_HOST_ARCH)
35+
OPTS = $($(ARCHOPTS))
36+
@@ -113,6 +113,8 @@ override_dh_auto_install-indep:
37+
38+
override_dh_auto_install-arch:
39+
$(MAKE) -C build_shared install DESTDIR=`pwd`/debian/tmp
40+
+ # Install FIPS module
41+
+ $(MAKE) -C build_shared install_fips DESTDIR=`pwd`/debian/tmp
42+
# pic static libraries, nobody should need them
43+
cp -pf build_static/libcrypto.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libcrypto.a
44+
cp -pf build_static/libssl.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libssl.a
45+
--
46+
2.39.5
47+

0 commit comments

Comments
 (0)