yubikey-piv-manager-1.0.2/ 0000775 0001750 0001750 00000000000 12526367550 015264 5 ustar dain dain 0000000 0000000 yubikey-piv-manager-1.0.2/resources/ 0000775 0001750 0001750 00000000000 12526367550 017276 5 ustar dain dain 0000000 0000000 yubikey-piv-manager-1.0.2/resources/osx-patch-ccid 0000775 0001750 0001750 00000004154 12516430121 022016 0 ustar dain dain 0000000 0000000 #!/usr/bin/python
import re
import subprocess
DEVICES = [
('0x1050', '0x0111', 'Yubico Yubikey NEO OTP+CCID'),
('0x1050', '0x0112', 'Yubico Yubikey NEO CCID'),
('0x1050', '0x0115', 'Yubico Yubikey NEO U2F+CCID'),
('0x1050', '0x0116', 'Yubico Yubikey NEO OTP+U2F+CCID'),
('0x1050', '0x0404', 'Yubico Yubikey 4 CCID'),
('0x1050', '0x0405', 'Yubico Yubikey 4 OTP+CCID'),
('0x1050', '0x0406', 'Yubico Yubikey 4 U2F+CCID'),
('0x1050', '0x0407', 'Yubico Yubikey 4 OTP+U2F+CCID')
]
FNAME = "/usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist"
def add_device(dev, content):
# Parsing XML with regexes, what a wonderful idea!
names = re.search('ifdFriendlyName\s*(.*?)', content, re.DOTALL)
if names.group(1).find('%s' % dev[2]) > 0:
print "%s already present, skipping..." % dev[2]
# Already added
return content
print "Adding:", dev[2]
pos = names.start(1)
content = content[:pos] + '\n\t\t%s' % dev[2] + content[pos:]
vids = re.search('ifdVendorID\s*(.*?)', content, re.DOTALL)
pos = vids.start(1)
content = content[:pos] + '\n\t\t%s' % dev[0] + content[pos:]
pids = re.search('ifdProductID\s*(.*?)', content, re.DOTALL)
pos = pids.start(1)
content = content[:pos] + '\n\t\t%s' % dev[1] + content[pos:]
return content
def restart_pcscd():
pids = subprocess.check_output("ps ax | grep pcscd | grep -v grep | awk '{ print $1 }'",
shell=True).strip()
if pids:
print "Killing PCSCD..."
for pid in pids.split():
subprocess.call(['kill', '-9', pid])
def main():
print "Patching file:", FNAME
with open(FNAME, 'r') as f:
content = f.read()
for dev in DEVICES:
content = add_device(dev, content)
print "Saving file:", FNAME
with open(FNAME, 'w') as f:
f.write(content)
restart_pcscd()
print "Patching complete!"
if __name__ == '__main__':
main()
yubikey-piv-manager-1.0.2/resources/pivman.icns 0000664 0001750 0001750 00000116642 12511501720 021437 0 ustar dain dain 0000000 0000000 icns ic08 jP
ftypjp2 jp2 Ojp2h ihdr colr "cdef jp2cOQ 2 d # Creator: JasPer Version 1.900.1R \ @@HHPHHPHHPHHPHHP] @@HHPHHPHHPHHPHHP] @@HHPHHPHHPHHPHHP] @@HHPHHPHHPHHPHHP
Y ߂XSqJfu)+1dL!簷*UM_jȩz
kj ~]>abo?9pUSɢw1ܻ߂8SqJf_iոP%æ/\w*Bɀq!˖4RlwhE߂PSqJfХصΫ^5ȲG-WQow b8&WqU$+iVy#k+Paٙ1FHᴏ߂0(W+'BZYM
_/_˖A@N̂xMNhoj ˕[o~ 7ssq\+@ކI;S Ki<8Vo!*%'Obl(7H|s2-HM"qCr-}촕ۀz<+-I{j{?"yQ0q,En0CIhcS^]UQǢ$ZҫzVYC!1HL%s~q 6|R_lʮ~ A@>ͨ'yOog_
~P@Y3LȲjvr_ਇix EffеWA5U*16$ xW;cDf[7zTY֛3Ol)_q`iF=-j:ԠFP|τȃEr{D>"(H?qV(Scv*z2+Tw}i#F.Q y`RO-7'|IKdCjyѥʫ9ua͟Ҋ6)U>
O*mn9D\8'yZS:>B'\
6M
żh*MhՁK8IH9+T"tYa9Z6RM65MU`AH
M2}w ؛)nlwr0,5N
՟dui\p2NX`&z
%ll.qR4ZV,^ (\OXb@Z+*T^g-|`*#]ܻ