Skip to content

Instantly share code, notes, and snippets.

@ntkathole
Created September 23, 2018 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntkathole/99ef83666ec855143ae328c8fc7c81ec to your computer and use it in GitHub Desktop.
Save ntkathole/99ef83666ec855143ae328c8fc7c81ec to your computer and use it in GitHub Desktop.
Script to generate custom certs
#! /bin/bash
name=${hostname}
mkdir ownca
pushd ownca
wget https://raw.githubusercontent.com/ntkathole/ownca/master/openssl.cnf
wget https://raw.githubusercontent.com/ntkathole/ownca/master/generate-ca.sh
wget https://raw.githubusercontent.com/ntkathole/ownca/master/generate-crt.sh
echo 100001 >> serial
chmod 744 *.sh
yes "" | ./generate-ca.sh
yes | ./generate-crt.sh $name
cp cacert.crt $name/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment