I manage many Yubikeys that act as smart cards for a technical user base. Every so often folks need to reset their keys (they typed their PIN in wrong enough times, aaagh!) or I need to find out the status of the PIV app on the Yubikey. yubico-piv-tool is my handy multitool for debugging those kind of things.

But, distributing yubico-piv-tool on the mac is a pain because it links against OpenSSL. You can get OpenSSL through Homebrew, but, maybe you don’t want to force everyone to install homebrew. And, maybe you need OpenSC to let other tools that speak PKCS11 use the Yubikey. Also, maybe you have Jamf and just want to give folks a one-click install. Many maybes here.

Anyways, if this is your world, this script will build a macOS package file that installs all the things into /usr/local/vpnkit and /Library/OpenSC.