OpenSSL renew-dummy-cert configuration example for Red Hat Enterprise Linux Server 7 (Maipo)

Get the default configuration file renew-dummy-cert for OpenSSL, optimized for Red Hat Enterprise Linux Server 7 (Maipo). This example configuration ensures optimal compatibility and performance for OpenSSL, making it easy to set up and adjust to meet your needs.

Find and download the configuration file here: /etc/pki/tls/certs/renew-dummy-cert.

For more configurations and setup guides, visit our related files section to further customize your system.

    #!/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

let -a SERIAL=0x$(openssl x509 -in $PEM -noout -serial | cut -d= -f2)
let SERIAL++

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 -set_serial $SERIAL -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


    
  

Config Details

Location
/etc/pki/tls/certs/renew-dummy-cert
Operating system
Red Hat Enterprise Linux Server 7 (Maipo)
Length
42 lines
MD5 checksum
222f052124249f5ad8c263927680ad6b

Usage

Download the raw file with wget or curl

Wget

wget -O renew-dummy-cert.example https://exampleconfig.com/static/raw/openssl/rhel7/etc/pki/tls/certs/renew-dummy-cert

cURL

curl https://exampleconfig.com/static/raw/openssl/rhel7/etc/pki/tls/certs/renew-dummy-cert > renew-dummy-cert.example