1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash -e if [[ $# -lt 1 ]]; then echo "Usage: $0 <outfile> [<any> <certutil> <args>]" echo "Called as: $0 $@" exit 1 fi CSR="$1" shift certutil -R -a -z <(head -c 4096 /dev/urandom) -o "$CSR" {{ options|join(' ') }} "$@"