22 lines
583 B
Bash
Executable File

#!/bin/bash
# Generate CA private key and certificate
step-cli certificate create "agentgateway.dev" \
ca-cert.pem ca-key.pem \
--profile root-ca \
--no-password --insecure
# Generate localhost private key and certificate signed by CA
step-cli certificate create localhost \
cert.pem key.pem \
--profile leaf \
--ca ca-cert.pem \
--ca-key ca-key.pem \
--san localhost \
--no-password --insecure \
--not-after 87600h # 10 years, since its just for testing
echo "Done! Generated files:"
echo " CA: ca-key.pem, ca-cert.pem"
echo " Localhost: key.pem, cert.pem"