Created
September 4, 2020 23:30
-
-
Save deeso/ca6111a566fdfcdc82e1c0d8cb877e99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -fLs -o /usr/local/bin/certstrap https://github.com/square/certstrap/releases/download/v1.2.0/certstrap-1.2.0-linux-amd64 | |
chmod +x /usr/local/bin/certstrap | |
# no passphrases | |
certstrap init --common-name "CertAuth" --expires "100 years" | |
certstrap request-cert --common-name collector | |
certstrap sign collector --CA CertAuth --expires "100 years" | |
cp out/cert.crt ./cert.pem | |
cp out/cert.key ./key.pem | |
# pkcs12 format | |
openssl pkcs12 -export -out outputCert.p12 -inkey cert.key -in cert.crt -certfile CA.crt | |
rm -rf out/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment