Files
Alte_Skripte/Yubikey/04_SC_import_cert9d.sh
2026-02-16 15:05:15 +01:00

20 lines
465 B
Bash
Executable File

#!/bin/bash
export PATH=$PATH:"/Applications/YubiKey Manager.app/Contents/MacOS"
FILE="/tmp/yubico-setup.txt"
source $FILE
cat "$CN"-9d.csr | tee /dev/tty | pbcopy
#
echo "***********************************"
echo "Please sign the CSR with the CA now"
echo "CSR 9d in pastboard now"
read -n 1 -s -r -p "Press any key to continue"
#
if [[ -e "CN=$CN.pem" ]];then
/bin/mv "CN=$CN.pem" "CN=$CN-9d.pem"
ykman piv import-certificate -m $KEY 9d "CN=$CN-9d.pem"
fi