From 3da7b00bbda2f1fcb86161918b87b1da91b2f0e1 Mon Sep 17 00:00:00 2001 From: George T Kramer Date: Wed, 14 Nov 2018 12:13:13 -0800 Subject: [PATCH] Ensure RANDFILE exists prior to usage OpenSSL complains if the RANDFILE does not exist when it is generating certificates. Create an initial seed for this file from urandom. Signed-off-by: George T Kramer --- koji-setup/deploy-koji.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koji-setup/deploy-koji.sh b/koji-setup/deploy-koji.sh index 0bb489d..0a6f69f 100755 --- a/koji-setup/deploy-koji.sh +++ b/koji-setup/deploy-koji.sh @@ -23,11 +23,13 @@ swupd bundle-add koji || true ## SETTING UP SSL CERTIFICATES FOR AUTHENTICATION KOJI_PKI_DIR=/etc/pki/koji mkdir -p "$KOJI_PKI_DIR"/{certs,private} +RANDFILE=$KOJI_PKI_DIR/.rand +dd if=/dev/urandom of="$RANDFILE" bs=256 count=1 # Certificate generation cat > "$KOJI_PKI_DIR"/ssl.cnf <<- EOF HOME = $KOJI_PKI_DIR -RANDFILE = $KOJI_PKI_DIR/.rand +RANDFILE = $RANDFILE [ca] default_ca = ca_default