20 lines
465 B
Bash
Executable File
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 |