Easy to use certificate authority for your lab, home, or demo.
chmod +x createCa.sh
./createCa.sh
###
chmod +x newCert.sh
./newCert.sh myhost.mydomain.com
Note: all passwords must have single quotes around them to prevent special characters from being interpreted by the shell
chmod +x newCert.sh
./newCert.sh myhost.mydomain.com 'myCAPassword' 'myPFXPassword' 'myPrivateKeyPassword'
Save your CSR file in the same directory as the scripts. The CSR file can have any name you want. The script will prompt you for the name of the CSR file if you do not supply it as an argument.
###
chmod +x newCertFromCSR.sh
./newCert.sh test.com.csr
Save your CSR file in the same directory as the scripts. The CSR file can have any name you want. The script will prompt you for the name of the CSR file if you do not supply it as an argument.
###
chmod +x newCertFromCSR.sh
./newCert.sh test.com.csr 'myCAPassword'
chmod +x newUserCert.sh
./newUserCert.sh joe
chmod +x revokeCert.sh
./revokeCert.sh myhost.mydomain.com
# or
./revokeCert.sh myhost.mydomain.com 'myCAPassword'
chmod +x revokeCert.sh
./revokeUserCert.sh joe
# or
./revokeCert.sh joe 'myCAPassword'
#Install nginx on your server
# Create a certificate for your nginx server hostname
./newCert.sh mylittleca.mydomain.com
# run the following command to configure and launch nginx to use your CA and the cert you just created
./startNginx.sh mylittleca.mydomain.com
git submodule add https://github.com/bats-core/bats-core.git test/bats
git submodule add https://github.com/bats-core/bats-support.git test/test_helper/bats-support
git submodule add https://github.com/bats-core/bats-assert.git test/test_helper/bats-assert
git submodule add https://github.com/bats-core/bats-file.git test/test_helper/bats-file
chmod +x ./createCa.sh ./fixup.sh ./newCert.sh ./newUserCert.sh ./revokeCert.sh ./revokeUserCert.sh
./test/bats/bin/bats test/testLittleCa.bats