From 07bdb5af5d9b802d69499fd1fc9758b8b865b65c Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 31 May 2023 17:09:43 +0200 Subject: [PATCH] Fix soures --- renew-dummy-cert | 39 +++++++++++++++++++++++++++++++++++++++ sources | 1 + 2 files changed, 40 insertions(+) create mode 100755 renew-dummy-cert create mode 100644 sources diff --git a/renew-dummy-cert b/renew-dummy-cert new file mode 100755 index 0000000..92e271c --- /dev/null +++ b/renew-dummy-cert @@ -0,0 +1,39 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then + echo $"Usage: `basename $0` filename" 1>&2 + exit 1 +fi + +PEM=$1 +REQ=`/bin/mktemp /tmp/openssl.XXXXXX` +KEY=`/bin/mktemp /tmp/openssl.XXXXXX` +CRT=`/bin/mktemp /tmp/openssl.XXXXXX` +NEW=${PEM}_ + +trap "rm -f $REQ $KEY $CRT $NEW" SIGINT + +if [ ! -f $PEM ]; then + echo "$PEM: file not found" 1>&2 + exit 1 +fi + +umask 077 + +OWNER=`ls -l $PEM | awk '{ printf "%s.%s", $3, $4; }'` + +openssl rsa -inform pem -in $PEM -out $KEY +openssl x509 -x509toreq -in $PEM -signkey $KEY -out $REQ +openssl x509 -req -in $REQ -signkey $KEY -days 365 \ + -extfile /etc/pki/tls/openssl.cnf -extensions v3_ca -out $CRT + +(cat $KEY ; echo "" ; cat $CRT) > $NEW + +chown $OWNER $NEW + +mv -f $NEW $PEM + +rm -f $REQ $KEY $CRT + +exit 0 + diff --git a/sources b/sources new file mode 100644 index 0000000..22b94a3 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (openssl-3.0.9.tar.gz) = 86c99146b37236419b110db77dd3ac3992e6bed78c258f0cc3434ca233460b4e17c0ac81d7058547fe9cb72a9fd80ee56d4b4916bb731dbe2bbcf1c3d46bf31a