diff options
Diffstat (limited to 'system-profiles/openssh/known-hosts/ca-sign.gup')
-rw-r--r-- | system-profiles/openssh/known-hosts/ca-sign.gup | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/system-profiles/openssh/known-hosts/ca-sign.gup b/system-profiles/openssh/known-hosts/ca-sign.gup new file mode 100644 index 00000000..512f0e84 --- /dev/null +++ b/system-profiles/openssh/known-hosts/ca-sign.gup | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/usr/bin/env zsh | ||
2 | set -eu | ||
3 | |||
4 | keyFile=${2%"-cert.pub"}.pub | ||
5 | principalsFile=${keyFile:h}/host-principals | ||
6 | gup -u ${keyFile} ${principalsFile} | ||
7 | gup -u expiration | ||
8 | |||
9 | ssh-keygen -h -Us ../ca/ca.pub -I $(uuidgen) -z $(tai64dec) -V "-1d:$(cat expiration)" -n $(cat ${principalsFile}) -f $1 ${keyFile} \ No newline at end of file | ||