Skip to content

Instantly share code, notes, and snippets.

@jameswhite
Created October 8, 2016 16:30
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 jameswhite/a4e9ce39600e069bbe3297f277fedf97 to your computer and use it in GitHub Desktop.
Save jameswhite/a4e9ce39600e069bbe3297f277fedf97 to your computer and use it in GitHub Desktop.
# export PASSWORD="bobloblawslawblog
# export USER=jameswhite
(
cd /var/cache/git/easy-rsa/easyrsa3;
./easyrsa gen-req ${USER}.user.thebikeshed.io nopass
./easyrsa sign-req client ${USER}.user.thebikeshed.io
# openssl rsa -in pki/private/${USER}.user.thebikeshed.io.key -out pki/private/${USER}.user.thebikeshed.io.ckey
openssl pkcs12 -export \
-out ${USER}.user.thebikeshed.io.p12 \
-inkey pki/private/${USER}.user.thebikeshed.io.key \
-in pki/issued/${USER}.user.thebikeshed.io.crt \
-certfile pki/ca.crt \
-passout fd:0
)
echo "${PASSWORD}" | \
openssl pkcs12 -export \
-out ${USER}.user.thebikeshed.io.p12 \
-inkey pki/private/${USER}.hq.thebikeshed.io.ckey \
-in pki/issued/${USER}.hq.thebikeshed.io.crt \
-certfile pki/ca.crt \
-passout fd:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment