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