#!/usr/bin/env bash set -e if ! [[ "$0" =~ "./gencerts.sh" ]]; then echo "must be run from 'fixtures-expired'" exit 255 fi if which cfssl >/dev/null; then echo "cfssl is installed; generating certs" else echo "cfssl is not installed; exiting" exit 255 fi cat > ./etcd-root-ca-csr.json < ./etcd-gencert.json < ./server-ca-csr.json </dev/null; then openssl x509 -in ./etcd-root-ca.pem -text -noout openssl x509 -in ./server.pem -text -noout fi