Skip to content

Commit 6879b20

Browse files
committed
T8508: Add build scripts to build Openssl 3.1.2
Update FIPS-140-3 compatible OpenSSL 3.1.2 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 aed9d15 commit 6879b20

5 files changed

Lines changed: 59 additions & 0 deletions

File tree

.github/workflows/trigger_rebuild_packages.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
- 'scripts/package-build/netfilter/**'
6969
node_exporter:
7070
- 'scripts/package-build/node_exporter/**'
71+
openssl:
72+
- 'scripts/package-build/openssl/**'
7173
openvpn-otp:
7274
- 'scripts/package-build/openvpn-otp/**'
7375
owamp:
@@ -207,6 +209,10 @@ jobs:
207209
trigger_build "node_exporter"
208210
fi
209211
212+
if [ "${{ steps.changes.outputs.openssl }}" == "true" ]; then
213+
trigger_build "openssl"
214+
fi
215+
210216
if [ "${{ steps.changes.outputs.openvpn-otp }}" == "true" ]; then
211217
trigger_build "openvpn-otp"
212218
fi
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[[packages]]
2+
name = "openssl"
3+
commit_id = "debian/openssl-3.1.2-1" # 3.1.2 FIPS 140-3 validated
4+
scm_url = "https://salsa.debian.org/debian/openssl.git"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 1df9a2271c543d1de87dc23bf8ec8da88ded87a3 Mon Sep 17 00:00:00 2001
2+
From: Viacheslav Hletenko <v.gletenko@vyos.io>
3+
Date: Fri, 17 Apr 2026 11:00:50 +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 9078f4f0d7..89bc434adf 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+
@@ -112,6 +112,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)