summaryrefslogtreecommitdiff
path: root/system-profiles/openssh/known-hosts/ca-sign.gup
blob: 512f0e845f2cd71c578a62d9d44ffef3a05dc366 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env zsh
set -eu

keyFile=${2%"-cert.pub"}.pub
principalsFile=${keyFile:h}/host-principals
gup -u ${keyFile} ${principalsFile}
gup -u expiration

ssh-keygen -h -Us ../ca/ca.pub -I $(uuidgen) -z $(tai64dec) -V "-1d:$(cat expiration)" -n $(cat ${principalsFile}) -f $1 ${keyFile}