From 3e37730a758aa775bdd959992c591d4ef0264b99 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 19 Sep 2022 14:52:05 +0200 Subject: [PATCH] Fix openssl pkcs12 export in pre-start.erb when in FIPS mode On a Ubuntu Bionic FIPS enabled stemcell, pre-start.erb fails. In FIPS Mode, the PKCS#12 format must use compatible encryption and hashing algorithms. Fixes: #358 --- jobs/uaa/templates/bin/pre-start.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jobs/uaa/templates/bin/pre-start.erb b/jobs/uaa/templates/bin/pre-start.erb index 64a5208759..af77cb074b 100755 --- a/jobs/uaa/templates/bin/pre-start.erb +++ b/jobs/uaa/templates/bin/pre-start.erb @@ -131,9 +131,13 @@ function process_certs { } function insert_ssl_cert { + local FIPS_OPTS="" + if [ -f "/proc/sys/crypto/fips_enabled" ] && [ "$(