Looks like I wasn't using the right SHA1 for my cert when calling codesign.
I figured I could get the cert information by using security export-smartcard -i [card] | grep sha1
sha1 : <dc 5f 8d 16 0f cd 03 42 ae 06 1d 70 71 6e 11 4b d4 38 d6 68>
After a bit of string manipulation: DC5F8D160FCD0342AE061D70716E114BD438D668
Now when I'm calling codesign -s "DC5F8D160FCD0342AE061D70716E114BD438D668" -f foobar I can see the sign method of my TKTokenSession being called.
tl;dr: New identity doesn't show up in Keychain, but it doesn't mean the OS can't use it. However you need to make sure you're using the right SHA1.
Topic:
Privacy & Security
SubTopic:
General
Tags: