Skip to content

Instantly share code, notes, and snippets.

@cnouguier
Created June 13, 2018 11:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cnouguier/c5cb4ba99ad45bced4476e2d175342a1 to your computer and use it in GitHub Desktop.
Save cnouguier/c5cb4ba99ad45bced4476e2d175342a1 to your computer and use it in GitHub Desktop.
Generate Certificate Authority files for Kaabah
# Generate passphrase file
$env LC_CTYPE=C < /dev/urandom tr -dc "+=\-%*\!&#':;{}()[]|^~\$_2-9T-Z" | head -c65 > ca.pass
# Generate the key pair files
$CA_SUBJ="${CA_SUBJ:-"/C=${CA_C:-"FR"}/L=${CA_L:-"Castelnaudary"}/O=${CA_O:-"Kalisio"}/OU=${CA_OU:-"Kaabah"}/CN=${CA_CN:-"*.kalis
io.xyz"}"}"
$openssl req \
-new -x509 -days 1825 \
-newkey rsa:4096 -keyout ca.key -passout file:ca.pass \
-out ca.cert -subj "${CA_SUBJ}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment