esc/mac/Tokend-35209/Tokend.xcodeproj project.pbxproj, NONE, 1.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/Tokend.xcodeproj
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16499/Tokend.xcodeproj
Added Files:
project.pbxproj
Log Message:
Add directory for Tokend-35209 for Leopard.
--- NEW FILE project.pbxproj ---
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objects = {
/* Begin PBXAggregateTarget section */
52B2601F0BC5A864007E00F1 /* world */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 52B260280BC5A864007E00F1 /* Build configuration list for PBXAggregateTarget "world" */;
buildPhases = (
);
dependencies = (
529252170BC6BEED00816597 /* PBXTargetDependency */,
);
name = world;
productName = world;
};
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
009F4D78111BACB400012078 /* coolkey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009F4D59111BACB400012078 /* coolkey.cpp */; };
009F4D79111BACB400012078 /* CoolKeyAttributeCoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009F4D5A111BACB400012078 /* CoolKeyAttributeCoder.cpp */; };
009F4D7A111BACB400012078 /* CoolKeyError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009F4D5C111BACB400012078 /* CoolKeyError.cpp */; };
009F4D7B111BACB400012078 /* CoolKeyHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009F4D5E111BACB400012078 /* CoolKeyHandle.cpp */; };
009F4D7C111BACB400012078 /* CoolKeyPK11.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009F4D60111BACB400012078 /* CoolKeyPK11.cpp */; };
009F4D7D111BACB400012078 /* CoolKeyRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009F4D62111BACB400012078 /* CoolKeyRecord.cpp */; };
009F4D7E111BACB400012078 /* CoolKeySchema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009F4D64111BACB400012078 /* CoolKeySchema.cpp */; };
009F4D7F111BACB400012078 /* CoolKeyToken.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 009F4D66111BACB400012078 /* CoolKeyToken.cpp */; };
009F4D82111BACB400012078 /* coolkey_csp_capabilities.mdsinfo in Resources */ = {isa = PBXBuildFile; fileRef = 009F4D6C111BACB400012078 /* coolkey_csp_capabilities.mdsinfo */; };
009F4D83111BACB400012078 /* coolkey_csp_capabilities_common.mds in Resources */ = {isa = PBXBuildFile; fileRef = 009F4D6D111BACB400012078 /* coolkey_csp_capabilities_common.mds */; };
009F4D84111BACB400012078 /* coolkey_csp_primary.mdsinfo in Resources */ = {isa = PBXBuildFile; fileRef = 009F4D6E111BACB400012078 /* coolkey_csp_primary.mdsinfo */; };
009F4D85111BACB400012078 /* coolkey_dl_primary.mdsinfo in Resources */ = {isa = PBXBuildFile; fileRef = 009F4D6F111BACB400012078 /* coolkey_dl_primary.mdsinfo */; };
009F4D86111BACB400012078 /* coolkey_smartcard.mdsinfo in Resources */ = {isa = PBXBuildFile; fileRef = 009F4D70111BACB400012078 /* coolkey_smartcard.mdsinfo */; };
009F4DFF111BB1A700012078 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CA8C4D606D6D19400F1BCC8 /* CoreFoundation.framework */; };
52B260320BC5A864007E00F1 /* Adornment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C1B9B6406DBF99F00014414 /* Adornment.cpp */; };
52B260330BC5A864007E00F1 /* Attribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A9606DBF81800FA17D9 /* Attribute.cpp */; };
52B260340BC5A864007E00F1 /* AttributeCoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A8A06DBF81800FA17D9 /* AttributeCoder.cpp */; };
52B260350BC5A864007E00F1 /* Cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A9806DBF81800FA17D9 /* Cursor.cpp */; };
52B260360BC5A864007E00F1 /* DbValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A9A06DBF81800FA17D9 /* DbValue.cpp */; };
52B260370BC5A864007E00F1 /* KeyHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C3C166E06F61D6F00FC8AAC /* KeyHandle.cpp */; };
52B260380BC5A864007E00F1 /* MetaAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A9C06DBF81800FA17D9 /* MetaAttribute.cpp */; };
52B260390BC5A864007E00F1 /* MetaRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A9E06DBF81800FA17D9 /* MetaRecord.cpp */; };
52B2603A0BC5A864007E00F1 /* Record.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134AA006DBF81800FA17D9 /* Record.cpp */; };
52B2603B0BC5A864007E00F1 /* RecordHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C55BAFC06DEABE500E4200A /* RecordHandle.cpp */; };
52B2603C0BC5A864007E00F1 /* Relation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A8E06DBF81800FA17D9 /* Relation.cpp */; };
52B2603D0BC5A864007E00F1 /* SCardError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC3947A0731A4DD00761DEE /* SCardError.cpp */; };
52B2603E0BC5A864007E00F1 /* Schema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134AA206DBF81800FA17D9 /* Schema.cpp */; };
52B2603F0BC5A864007E00F1 /* SelectionPredicate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134AA406DBF81800FA17D9 /* SelectionPredicate.cpp */; };
52B260400BC5A864007E00F1 /* Token.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A9006DBF81800FA17D9 /* Token.cpp */; };
52B260410BC5A864007E00F1 /* TokenContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C134A9206DBF81800FA17D9 /* TokenContext.cpp */; };
52B2604D0BC5A864007E00F1 /* Adornment.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C1B9B6306DBF99F00014414 /* Adornment.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B2604E0BC5A864007E00F1 /* Attribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A9706DBF81800FA17D9 /* Attribute.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B2604F0BC5A864007E00F1 /* AttributeCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A8B06DBF81800FA17D9 /* AttributeCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260500BC5A864007E00F1 /* Cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A9906DBF81800FA17D9 /* Cursor.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260510BC5A864007E00F1 /* DbValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A9B06DBF81800FA17D9 /* DbValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260520BC5A864007E00F1 /* KeyHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C3C166D06F61D6F00FC8AAC /* KeyHandle.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260530BC5A864007E00F1 /* MetaAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A9D06DBF81800FA17D9 /* MetaAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260540BC5A864007E00F1 /* MetaRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A9F06DBF81800FA17D9 /* MetaRecord.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260550BC5A864007E00F1 /* Record.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134AA106DBF81800FA17D9 /* Record.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260560BC5A864007E00F1 /* RecordHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C55BAFB06DEABE500E4200A /* RecordHandle.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260570BC5A864007E00F1 /* Relation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A8F06DBF81800FA17D9 /* Relation.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260580BC5A864007E00F1 /* SCardError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CC394790731A4DD00761DEE /* SCardError.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B260590BC5A864007E00F1 /* Schema.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134AA306DBF81800FA17D9 /* Schema.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B2605A0BC5A864007E00F1 /* SelectionPredicate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134AA506DBF81800FA17D9 /* SelectionPredicate.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B2605B0BC5A864007E00F1 /* Token.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A9106DBF81800FA17D9 /* Token.h */; settings = {ATTRIBUTES = (Public, ); }; };
52B2605C0BC5A864007E00F1 /* TokenContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C134A9306DBF81800FA17D9 /* TokenContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
00A5CAE9111A373900EBA8FC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 52B2602D0BC5A864007E00F1;
remoteInfo = "libtokend (Upgraded)";
};
529252160BC6BEED00816597 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 52B2602D0BC5A864007E00F1;
remoteInfo = libtokend;
};
52B260DE0BC5A864007E00F1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 52B2604B0BC5A864007E00F1;
remoteInfo = "tokend (Upgraded)";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
009F4D59111BACB400012078 /* coolkey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coolkey.cpp; sourceTree = "<group>"; };
009F4D5A111BACB400012078 /* CoolKeyAttributeCoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoolKeyAttributeCoder.cpp; sourceTree = "<group>"; };
009F4D5B111BACB400012078 /* CoolKeyAttributeCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoolKeyAttributeCoder.h; sourceTree = "<group>"; };
009F4D5C111BACB400012078 /* CoolKeyError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoolKeyError.cpp; sourceTree = "<group>"; };
009F4D5D111BACB400012078 /* CoolKeyError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoolKeyError.h; sourceTree = "<group>"; };
009F4D5E111BACB400012078 /* CoolKeyHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoolKeyHandle.cpp; sourceTree = "<group>"; };
009F4D5F111BACB400012078 /* CoolKeyHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoolKeyHandle.h; sourceTree = "<group>"; };
009F4D60111BACB400012078 /* CoolKeyPK11.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoolKeyPK11.cpp; sourceTree = "<group>"; };
009F4D61111BACB400012078 /* CoolKeyPK11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoolKeyPK11.h; sourceTree = "<group>"; };
009F4D62111BACB400012078 /* CoolKeyRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoolKeyRecord.cpp; sourceTree = "<group>"; };
009F4D63111BACB400012078 /* CoolKeyRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoolKeyRecord.h; sourceTree = "<group>"; };
009F4D64111BACB400012078 /* CoolKeySchema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoolKeySchema.cpp; sourceTree = "<group>"; };
009F4D65111BACB400012078 /* CoolKeySchema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoolKeySchema.h; sourceTree = "<group>"; };
009F4D66111BACB400012078 /* CoolKeyToken.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoolKeyToken.cpp; sourceTree = "<group>"; };
009F4D67111BACB400012078 /* CoolKeyToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoolKeyToken.h; sourceTree = "<group>"; };
009F4D68111BACB400012078 /* dlfcn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dlfcn.h; sourceTree = "<group>"; };
009F4D69111BACB400012078 /* dlfcn.h.orig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dlfcn.h.orig; sourceTree = "<group>"; };
009F4D6C111BACB400012078 /* coolkey_csp_capabilities.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_csp_capabilities.mdsinfo; sourceTree = "<group>"; };
009F4D6D111BACB400012078 /* coolkey_csp_capabilities_common.mds */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_csp_capabilities_common.mds; sourceTree = "<group>"; };
009F4D6E111BACB400012078 /* coolkey_csp_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_csp_primary.mdsinfo; sourceTree = "<group>"; };
009F4D6F111BACB400012078 /* coolkey_dl_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_dl_primary.mdsinfo; sourceTree = "<group>"; };
009F4D70111BACB400012078 /* coolkey_smartcard.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_smartcard.mdsinfo; sourceTree = "<group>"; };
009F4D73111BACB400012078 /* cryptoki.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cryptoki.h; sourceTree = "<group>"; };
009F4D74111BACB400012078 /* mypkcs11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mypkcs11.h; sourceTree = "<group>"; };
009F4D75111BACB400012078 /* pkcs11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pkcs11.h; sourceTree = "<group>"; };
009F4D76111BACB400012078 /* pkcs11f.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pkcs11f.h; sourceTree = "<group>"; };
009F4D77111BACB400012078 /* pkcs11t.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pkcs11t.h; sourceTree = "<group>"; };
00A5CAAD111A358200EBA8FC /* coolkey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = coolkey.cpp; path = CoolKey/coolkey.cpp; sourceTree = "<group>"; };
00A5CAAE111A358200EBA8FC /* CoolKeyAttributeCoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CoolKeyAttributeCoder.cpp; path = CoolKey/CoolKeyAttributeCoder.cpp; sourceTree = "<group>"; };
00A5CAAF111A358200EBA8FC /* CoolKeyAttributeCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoolKeyAttributeCoder.h; path = CoolKey/CoolKeyAttributeCoder.h; sourceTree = "<group>"; };
00A5CAB0111A358200EBA8FC /* CoolKeyError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CoolKeyError.cpp; path = CoolKey/CoolKeyError.cpp; sourceTree = "<group>"; };
00A5CAB1111A358200EBA8FC /* CoolKeyError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoolKeyError.h; path = CoolKey/CoolKeyError.h; sourceTree = "<group>"; };
00A5CAB2111A358200EBA8FC /* CoolKeyHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CoolKeyHandle.cpp; path = CoolKey/CoolKeyHandle.cpp; sourceTree = "<group>"; };
00A5CAB3111A358200EBA8FC /* CoolKeyHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoolKeyHandle.h; path = CoolKey/CoolKeyHandle.h; sourceTree = "<group>"; };
00A5CAB4111A358200EBA8FC /* CoolKeyPK11.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CoolKeyPK11.cpp; path = CoolKey/CoolKeyPK11.cpp; sourceTree = "<group>"; };
00A5CAB5111A358200EBA8FC /* CoolKeyPK11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoolKeyPK11.h; path = CoolKey/CoolKeyPK11.h; sourceTree = "<group>"; };
00A5CAB6111A358200EBA8FC /* CoolKeyRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CoolKeyRecord.cpp; path = CoolKey/CoolKeyRecord.cpp; sourceTree = "<group>"; };
00A5CAB7111A358200EBA8FC /* CoolKeyRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoolKeyRecord.h; path = CoolKey/CoolKeyRecord.h; sourceTree = "<group>"; };
00A5CAB8111A358200EBA8FC /* CoolKeySchema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CoolKeySchema.cpp; path = CoolKey/CoolKeySchema.cpp; sourceTree = "<group>"; };
00A5CAB9111A358200EBA8FC /* CoolKeySchema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoolKeySchema.h; path = CoolKey/CoolKeySchema.h; sourceTree = "<group>"; };
00A5CABA111A358200EBA8FC /* CoolKeyToken.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CoolKeyToken.cpp; path = CoolKey/CoolKeyToken.cpp; sourceTree = "<group>"; };
00A5CABB111A358200EBA8FC /* CoolKeyToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoolKeyToken.h; path = CoolKey/CoolKeyToken.h; sourceTree = "<group>"; };
00A5CABD111A358200EBA8FC /* Entries */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Entries; sourceTree = "<group>"; };
00A5CABE111A358200EBA8FC /* Repository */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Repository; sourceTree = "<group>"; };
00A5CABF111A358200EBA8FC /* Root */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Root; sourceTree = "<group>"; };
00A5CAC0111A358200EBA8FC /* Tag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Tag; sourceTree = "<group>"; };
00A5CAC1111A358200EBA8FC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = CoolKey/Info.plist; sourceTree = "<group>"; };
00A5CAC3111A358200EBA8FC /* coolkey_csp_capabilities.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_csp_capabilities.mdsinfo; sourceTree = "<group>"; };
00A5CAC4111A358200EBA8FC /* coolkey_csp_capabilities_common.mds */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_csp_capabilities_common.mds; sourceTree = "<group>"; };
00A5CAC5111A358200EBA8FC /* coolkey_csp_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_csp_primary.mdsinfo; sourceTree = "<group>"; };
00A5CAC6111A358200EBA8FC /* coolkey_dl_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_dl_primary.mdsinfo; sourceTree = "<group>"; };
00A5CAC7111A358200EBA8FC /* coolkey_smartcard.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = coolkey_smartcard.mdsinfo; sourceTree = "<group>"; };
00A5CAC9111A358200EBA8FC /* compile.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = compile.sh; sourceTree = "<group>"; };
00A5CACA111A358200EBA8FC /* cryptoki.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cryptoki.h; sourceTree = "<group>"; };
00A5CACB111A358200EBA8FC /* mypkcs11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mypkcs11.h; sourceTree = "<group>"; };
00A5CACC111A358200EBA8FC /* pkcs11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pkcs11.h; sourceTree = "<group>"; };
00A5CACD111A358200EBA8FC /* pkcs11f.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pkcs11f.h; sourceTree = "<group>"; };
00A5CACE111A358200EBA8FC /* pkcs11t.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pkcs11t.h; sourceTree = "<group>"; };
00A5CAFE111A373900EBA8FC /* COOLKEY.tokend */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = COOLKEY.tokend; sourceTree = BUILT_PRODUCTS_DIR; };
4C134A8A06DBF81800FA17D9 /* AttributeCoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AttributeCoder.cpp; sourceTree = "<group>"; };
4C134A8B06DBF81800FA17D9 /* AttributeCoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AttributeCoder.h; sourceTree = "<group>"; };
4C134A8E06DBF81800FA17D9 /* Relation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Relation.cpp; sourceTree = "<group>"; };
4C134A8F06DBF81800FA17D9 /* Relation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Relation.h; sourceTree = "<group>"; };
4C134A9006DBF81800FA17D9 /* Token.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Token.cpp; sourceTree = "<group>"; };
4C134A9106DBF81800FA17D9 /* Token.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Token.h; sourceTree = "<group>"; };
4C134A9206DBF81800FA17D9 /* TokenContext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TokenContext.cpp; sourceTree = "<group>"; };
4C134A9306DBF81800FA17D9 /* TokenContext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TokenContext.h; sourceTree = "<group>"; };
4C134A9606DBF81800FA17D9 /* Attribute.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Attribute.cpp; sourceTree = "<group>"; };
4C134A9706DBF81800FA17D9 /* Attribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Attribute.h; sourceTree = "<group>"; };
4C134A9806DBF81800FA17D9 /* Cursor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Cursor.cpp; sourceTree = "<group>"; };
4C134A9906DBF81800FA17D9 /* Cursor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Cursor.h; sourceTree = "<group>"; };
4C134A9A06DBF81800FA17D9 /* DbValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DbValue.cpp; sourceTree = "<group>"; };
4C134A9B06DBF81800FA17D9 /* DbValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DbValue.h; sourceTree = "<group>"; };
4C134A9C06DBF81800FA17D9 /* MetaAttribute.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MetaAttribute.cpp; sourceTree = "<group>"; };
4C134A9D06DBF81800FA17D9 /* MetaAttribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MetaAttribute.h; sourceTree = "<group>"; };
4C134A9E06DBF81800FA17D9 /* MetaRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MetaRecord.cpp; sourceTree = "<group>"; };
4C134A9F06DBF81800FA17D9 /* MetaRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MetaRecord.h; sourceTree = "<group>"; };
4C134AA006DBF81800FA17D9 /* Record.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Record.cpp; sourceTree = "<group>"; };
4C134AA106DBF81800FA17D9 /* Record.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Record.h; sourceTree = "<group>"; };
4C134AA206DBF81800FA17D9 /* Schema.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Schema.cpp; sourceTree = "<group>"; };
4C134AA306DBF81800FA17D9 /* Schema.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Schema.h; sourceTree = "<group>"; };
4C134AA406DBF81800FA17D9 /* SelectionPredicate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionPredicate.cpp; sourceTree = "<group>"; };
4C134AA506DBF81800FA17D9 /* SelectionPredicate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionPredicate.h; sourceTree = "<group>"; };
4C134AA906DBF81800FA17D9 /* MscError.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MscError.cpp; sourceTree = "<group>"; };
4C134AAA06DBF81800FA17D9 /* MscError.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MscError.h; sourceTree = "<group>"; };
4C134AAB06DBF81800FA17D9 /* MscACL.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MscACL.cpp; sourceTree = "<group>"; };
4C134AAC06DBF81800FA17D9 /* MscACL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MscACL.h; sourceTree = "<group>"; };
4C134AAF06DBF81800FA17D9 /* MscKey.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MscKey.cpp; sourceTree = "<group>"; };
4C134AB006DBF81800FA17D9 /* MscKey.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MscKey.h; sourceTree = "<group>"; };
4C134AB106DBF81800FA17D9 /* MscObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MscObject.cpp; sourceTree = "<group>"; };
4C134AB206DBF81800FA17D9 /* MscObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MscObject.h; sourceTree = "<group>"; };
4C134AB306DBF81800FA17D9 /* MscPIN.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MscPIN.cpp; sourceTree = "<group>"; };
4C134AB406DBF81800FA17D9 /* MscPIN.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MscPIN.h; sourceTree = "<group>"; };
4C134AB506DBF81800FA17D9 /* MscToken.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MscToken.cpp; sourceTree = "<group>"; };
4C134AB606DBF81800FA17D9 /* MscToken.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MscToken.h; sourceTree = "<group>"; };
4C134AB706DBF81800FA17D9 /* MscTokenConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MscTokenConnection.cpp; sourceTree = "<group>"; };
4C134AB806DBF81800FA17D9 /* MscTokenConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MscTokenConnection.h; sourceTree = "<group>"; };
4C134AB906DBF81800FA17D9 /* MscWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MscWrappers.cpp; sourceTree = "<group>"; };
4C134ABA06DBF81800FA17D9 /* MscWrappers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MscWrappers.h; sourceTree = "<group>"; };
4C1B9B5B06DBF96E00014414 /* MuscleCardAttributeCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MuscleCardAttributeCoder.h; sourceTree = "<group>"; };
4C1B9B5C06DBF96E00014414 /* MuscleCardAttributeCoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MuscleCardAttributeCoder.cpp; sourceTree = "<group>"; };
4C1B9B6306DBF99F00014414 /* Adornment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Adornment.h; sourceTree = "<group>"; };
4C1B9B6406DBF99F00014414 /* Adornment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Adornment.cpp; sourceTree = "<group>"; };
4C1B9B8806DBFEE200014414 /* MuscleCardSchema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MuscleCardSchema.h; sourceTree = "<group>"; };
4C1B9B8906DBFEE200014414 /* MuscleCardSchema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MuscleCardSchema.cpp; sourceTree = "<group>"; };
4C253C0D06F66A6100B5CED6 /* MuscleCardKeyHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MuscleCardKeyHandle.h; sourceTree = "<group>"; };
4C253C0E06F66A6100B5CED6 /* MuscleCardKeyHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MuscleCardKeyHandle.cpp; sourceTree = "<group>"; };
4C3C166D06F61D6F00FC8AAC /* KeyHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyHandle.h; sourceTree = "<group>"; };
4C3C166E06F61D6F00FC8AAC /* KeyHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyHandle.cpp; sourceTree = "<group>"; };
4C3FACAC06DBF84400D18D5F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4C3FACAD06DBF84400D18D5F /* musclecard.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = musclecard.cpp; sourceTree = "<group>"; };
4C3FACAE06DBF84400D18D5F /* MuscleCardToken.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MuscleCardToken.cpp; sourceTree = "<group>"; };
4C3FACAF06DBF84400D18D5F /* MuscleCardToken.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MuscleCardToken.h; sourceTree = "<group>"; };
4C55BAFB06DEABE500E4200A /* RecordHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordHandle.h; sourceTree = "<group>"; };
4C55BAFC06DEABE500E4200A /* RecordHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecordHandle.cpp; sourceTree = "<group>"; };
4C5C1CE8073065EA00AECB7F /* belpic_csp_capabilities.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = belpic_csp_capabilities.mdsinfo; path = BELPIC/mds/belpic_csp_capabilities.mdsinfo; sourceTree = SOURCE_ROOT; };
4C5C1CE9073065EA00AECB7F /* belpic_csp_capabilities_common.mds */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = belpic_csp_capabilities_common.mds; path = BELPIC/mds/belpic_csp_capabilities_common.mds; sourceTree = SOURCE_ROOT; };
4C5C1CEA073065EA00AECB7F /* belpic_csp_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = belpic_csp_primary.mdsinfo; path = BELPIC/mds/belpic_csp_primary.mdsinfo; sourceTree = SOURCE_ROOT; };
4C5C1CEB073065EA00AECB7F /* belpic_dl_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = belpic_dl_primary.mdsinfo; path = BELPIC/mds/belpic_dl_primary.mdsinfo; sourceTree = SOURCE_ROOT; };
4C5C1CEC073065EA00AECB7F /* belpic_smartcard.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = belpic_smartcard.mdsinfo; path = BELPIC/mds/belpic_smartcard.mdsinfo; sourceTree = SOURCE_ROOT; };
4C5C1D300730664E00AECB7F /* musclecard_csp_capabilities.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = musclecard_csp_capabilities.mdsinfo; path = MuscleCard/mds/musclecard_csp_capabilities.mdsinfo; sourceTree = SOURCE_ROOT; };
4C5C1D310730664E00AECB7F /* musclecard_csp_capabilities_common.mds */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = musclecard_csp_capabilities_common.mds; path = MuscleCard/mds/musclecard_csp_capabilities_common.mds; sourceTree = SOURCE_ROOT; };
4C5C1D320730664E00AECB7F /* musclecard_csp_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = musclecard_csp_primary.mdsinfo; path = MuscleCard/mds/musclecard_csp_primary.mdsinfo; sourceTree = SOURCE_ROOT; };
4C5C1D330730664E00AECB7F /* musclecard_dl_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = musclecard_dl_primary.mdsinfo; path = MuscleCard/mds/musclecard_dl_primary.mdsinfo; sourceTree = SOURCE_ROOT; };
4C5C1D340730664E00AECB7F /* musclecard_smartcard.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = musclecard_smartcard.mdsinfo; path = MuscleCard/mds/musclecard_smartcard.mdsinfo; sourceTree = SOURCE_ROOT; };
4C63F7A506DC052A00CB6F22 /* TokenRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TokenRecord.cpp; sourceTree = "<group>"; };
4C63F7A606DC052A00CB6F22 /* TokenRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TokenRecord.h; sourceTree = "<group>"; };
4C86D3A0070B4122006A0C7F /* belpic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = belpic.cpp; sourceTree = "<group>"; };
4C86D3A3070B4122006A0C7F /* BELPICError.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BELPICError.cpp; sourceTree = "<group>"; };
4C86D3A4070B4122006A0C7F /* BELPICError.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BELPICError.h; sourceTree = "<group>"; };
4C86D3A5070B4122006A0C7F /* BELPICKeyHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BELPICKeyHandle.cpp; sourceTree = "<group>"; };
4C86D3A6070B4122006A0C7F /* BELPICKeyHandle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BELPICKeyHandle.h; sourceTree = "<group>"; };
4C86D3A7070B4122006A0C7F /* BELPICRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BELPICRecord.cpp; sourceTree = "<group>"; };
4C86D3A8070B4122006A0C7F /* BELPICRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BELPICRecord.h; sourceTree = "<group>"; };
4C86D3A9070B4122006A0C7F /* BELPICSchema.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BELPICSchema.cpp; sourceTree = "<group>"; };
4C86D3AA070B4122006A0C7F /* BELPICSchema.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BELPICSchema.h; sourceTree = "<group>"; };
4C86D3AB070B4122006A0C7F /* BELPICToken.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BELPICToken.cpp; sourceTree = "<group>"; };
4C86D3AC070B4122006A0C7F /* BELPICToken.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BELPICToken.h; sourceTree = "<group>"; };
4C86D3AD070B4122006A0C7F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4CA858F10654413F0083DED3 /* SecurityTokend.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SecurityTokend.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4CA8C4D606D6D19400F1BCC8 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
4CBF5CBE0704E76200EEADC2 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.1.dylib; sourceTree = "<absolute>"; };
4CC394790731A4DD00761DEE /* SCardError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCardError.h; sourceTree = "<group>"; };
4CC3947A0731A4DD00761DEE /* SCardError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SCardError.cpp; sourceTree = "<group>"; };
4CE2E6A406DC06AB00E21469 /* KeyRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = KeyRecord.cpp; sourceTree = "<group>"; };
4CE2E6A506DC06AB00E21469 /* KeyRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KeyRecord.h; sourceTree = "<group>"; };
523C07E70B7B940D00067DEA /* PIVDefines.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PIVDefines.h; path = PIV/PIVDefines.h; sourceTree = "<group>"; };
523F79EC06D5AC27004256A0 /* security_cdsa_client.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = security_cdsa_client.framework; sourceTree = BUILT_PRODUCTS_DIR; };
523F79ED06D5AC27004256A0 /* security_cdsa_utilities.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = security_cdsa_utilities.framework; sourceTree = BUILT_PRODUCTS_DIR; };
523F79EE06D5AC27004256A0 /* security_utilities.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = security_utilities.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5280677F0B78E98600D02C3A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = Info.plist; path = PIV/Info.plist; sourceTree = "<group>"; };
528067810B78E98600D02C3A /* piv_csp_capabilities.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = piv_csp_capabilities.mdsinfo; sourceTree = "<group>"; };
528067820B78E98600D02C3A /* piv_csp_capabilities_common.mds */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = piv_csp_capabilities_common.mds; sourceTree = "<group>"; };
528067830B78E98600D02C3A /* piv_csp_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = piv_csp_primary.mdsinfo; sourceTree = "<group>"; };
528067840B78E98600D02C3A /* piv_dl_primary.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = piv_dl_primary.mdsinfo; sourceTree = "<group>"; };
528067850B78E98600D02C3A /* piv_smartcard.mdsinfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = piv_smartcard.mdsinfo; sourceTree = "<group>"; };
528067860B78E98600D02C3A /* piv.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = piv.cpp; path = PIV/piv.cpp; sourceTree = "<group>"; };
528067870B78E98600D02C3A /* PIVAttributeCoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PIVAttributeCoder.cpp; path = PIV/PIVAttributeCoder.cpp; sourceTree = "<group>"; };
528067880B78E98600D02C3A /* PIVAttributeCoder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PIVAttributeCoder.h; path = PIV/PIVAttributeCoder.h; sourceTree = "<group>"; };
528067890B78E98600D02C3A /* PIVError.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PIVError.cpp; path = PIV/PIVError.cpp; sourceTree = "<group>"; };
5280678A0B78E98600D02C3A /* PIVError.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PIVError.h; path = PIV/PIVError.h; sourceTree = "<group>"; };
5280678B0B78E98600D02C3A /* PIVKeyHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PIVKeyHandle.cpp; path = PIV/PIVKeyHandle.cpp; sourceTree = "<group>"; };
5280678C0B78E98600D02C3A /* PIVKeyHandle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PIVKeyHandle.h; path = PIV/PIVKeyHandle.h; sourceTree = "<group>"; };
5280678D0B78E98600D02C3A /* PIVRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PIVRecord.cpp; path = PIV/PIVRecord.cpp; sourceTree = "<group>"; };
5280678E0B78E98600D02C3A /* PIVRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PIVRecord.h; path = PIV/PIVRecord.h; sourceTree = "<group>"; };
5280678F0B78E98600D02C3A /* PIVSchema.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PIVSchema.cpp; path = PIV/PIVSchema.cpp; sourceTree = "<group>"; };
528067900B78E98600D02C3A /* PIVSchema.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PIVSchema.h; path = PIV/PIVSchema.h; sourceTree = "<group>"; };
528067910B78E98600D02C3A /* PIVToken.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PIVToken.cpp; path = PIV/PIVToken.cpp; sourceTree = "<group>"; };
528067920B78E98600D02C3A /* PIVToken.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PIVToken.h; path = PIV/PIVToken.h; sourceTree = "<group>"; };
529D9A7B0B867FA900DBFA4B /* PIVCCC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PIVCCC.cpp; path = PIV/PIVCCC.cpp; sourceTree = "<group>"; };
529D9A7C0B867FA900DBFA4B /* PIVCCC.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PIVCCC.h; path = PIV/PIVCCC.h; sourceTree = "<group>"; };
52B2604A0BC5A864007E00F1 /* libtokend.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libtokend.a; sourceTree = BUILT_PRODUCTS_DIR; };
52B260620BC5A864007E00F1 /* Info-tokend__Upgraded_.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-tokend__Upgraded_.plist"; sourceTree = "<group>"; };
52B260630BC5A864007E00F1 /* tokend.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = tokend.framework; sourceTree = BUILT_PRODUCTS_DIR; };
52CA8342067E8175005A1EBA /* PCSC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PCSC.framework; path = /System/Library/Frameworks/PCSC.framework; sourceTree = "<absolute>"; };
52CA8343067E8175005A1EBA /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Security.framework; sourceTree = BUILT_PRODUCTS_DIR; };
52DE698106E93B870024EA03 /* PKCS11Object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PKCS11Object.h; sourceTree = "<group>"; };
52DE698206E93B870024EA03 /* PKCS11Object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PKCS11Object.cpp; sourceTree = "<group>"; };
52E66B8E0E92E78700CDE046 /* byte_string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = byte_string.h; path = PIV/byte_string.h; sourceTree = "<group>"; };
52E66B8F0E92E78700CDE046 /* Padding.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Padding.cpp; path = PIV/Padding.cpp; sourceTree = "<group>"; };
52E66B900E92E78700CDE046 /* Padding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Padding.h; path = PIV/Padding.h; sourceTree = "<group>"; };
52E66B910E92E78700CDE046 /* PIVUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PIVUtilities.h; path = PIV/PIVUtilities.h; sourceTree = "<group>"; };
52E66B920E92E78700CDE046 /* SecureBufferAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SecureBufferAllocator.h; path = PIV/SecureBufferAllocator.h; sourceTree = "<group>"; };
52E66B930E92E78700CDE046 /* SecureBufferAllocator.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SecureBufferAllocator.inc; path = PIV/SecureBufferAllocator.inc; sourceTree = "<group>"; };
52E66B940E92E78700CDE046 /* TLV.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TLV.cpp; path = PIV/TLV.cpp; sourceTree = "<group>"; };
52E66B950E92E78700CDE046 /* TLV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TLV.h; path = PIV/TLV.h; sourceTree = "<group>"; };
52E66B960E92E78700CDE046 /* TLV.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = TLV.inc; path = PIV/TLV.inc; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
00A5CAF8111A373900EBA8FC /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
009F4DFF111BB1A700012078 /* CoreFoundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
009F4D58111BACB400012078 /* CoolKey */ = {
isa = PBXGroup;
children = (
009F4D59111BACB400012078 /* coolkey.cpp */,
009F4D5A111BACB400012078 /* CoolKeyAttributeCoder.cpp */,
009F4D5B111BACB400012078 /* CoolKeyAttributeCoder.h */,
009F4D5C111BACB400012078 /* CoolKeyError.cpp */,
009F4D5D111BACB400012078 /* CoolKeyError.h */,
009F4D5E111BACB400012078 /* CoolKeyHandle.cpp */,
009F4D5F111BACB400012078 /* CoolKeyHandle.h */,
009F4D60111BACB400012078 /* CoolKeyPK11.cpp */,
009F4D61111BACB400012078 /* CoolKeyPK11.h */,
009F4D62111BACB400012078 /* CoolKeyRecord.cpp */,
009F4D63111BACB400012078 /* CoolKeyRecord.h */,
009F4D64111BACB400012078 /* CoolKeySchema.cpp */,
009F4D65111BACB400012078 /* CoolKeySchema.h */,
009F4D66111BACB400012078 /* CoolKeyToken.cpp */,
009F4D67111BACB400012078 /* CoolKeyToken.h */,
009F4D68111BACB400012078 /* dlfcn.h */,
009F4D69111BACB400012078 /* dlfcn.h.orig */,
009F4D6B111BACB400012078 /* mds */,
009F4D71111BACB400012078 /* pkcs11 */,
);
path = CoolKey;
sourceTree = "<group>";
};
009F4D6B111BACB400012078 /* mds */ = {
isa = PBXGroup;
children = (
009F4D6C111BACB400012078 /* coolkey_csp_capabilities.mdsinfo */,
009F4D6D111BACB400012078 /* coolkey_csp_capabilities_common.mds */,
009F4D6E111BACB400012078 /* coolkey_csp_primary.mdsinfo */,
009F4D6F111BACB400012078 /* coolkey_dl_primary.mdsinfo */,
009F4D70111BACB400012078 /* coolkey_smartcard.mdsinfo */,
);
path = mds;
sourceTree = "<group>";
};
009F4D71111BACB400012078 /* pkcs11 */ = {
isa = PBXGroup;
children = (
009F4D73111BACB400012078 /* cryptoki.h */,
009F4D74111BACB400012078 /* mypkcs11.h */,
009F4D75111BACB400012078 /* pkcs11.h */,
009F4D76111BACB400012078 /* pkcs11f.h */,
009F4D77111BACB400012078 /* pkcs11t.h */,
);
path = pkcs11;
sourceTree = "<group>";
};
00A5CAAC111A356200EBA8FC /* Tokend-35209 */ = {
isa = PBXGroup;
children = (
00A5CAAD111A358200EBA8FC /* coolkey.cpp */,
00A5CAAE111A358200EBA8FC /* CoolKeyAttributeCoder.cpp */,
00A5CAAF111A358200EBA8FC /* CoolKeyAttributeCoder.h */,
00A5CAB0111A358200EBA8FC /* CoolKeyError.cpp */,
00A5CAB1111A358200EBA8FC /* CoolKeyError.h */,
00A5CAB2111A358200EBA8FC /* CoolKeyHandle.cpp */,
00A5CAB3111A358200EBA8FC /* CoolKeyHandle.h */,
00A5CAB4111A358200EBA8FC /* CoolKeyPK11.cpp */,
00A5CAB5111A358200EBA8FC /* CoolKeyPK11.h */,
00A5CAB6111A358200EBA8FC /* CoolKeyRecord.cpp */,
00A5CAB7111A358200EBA8FC /* CoolKeyRecord.h */,
00A5CAB8111A358200EBA8FC /* CoolKeySchema.cpp */,
00A5CAB9111A358200EBA8FC /* CoolKeySchema.h */,
00A5CABA111A358200EBA8FC /* CoolKeyToken.cpp */,
00A5CABB111A358200EBA8FC /* CoolKeyToken.h */,
00A5CABC111A358200EBA8FC /* CVS */,
00A5CAC1111A358200EBA8FC /* Info.plist */,
00A5CAC2111A358200EBA8FC /* mds */,
00A5CAC8111A358200EBA8FC /* pkcs11 */,
);
name = "Tokend-35209";
sourceTree = "<group>";
};
00A5CABC111A358200EBA8FC /* CVS */ = {
isa = PBXGroup;
children = (
00A5CABD111A358200EBA8FC /* Entries */,
00A5CABE111A358200EBA8FC /* Repository */,
00A5CABF111A358200EBA8FC /* Root */,
00A5CAC0111A358200EBA8FC /* Tag */,
);
name = CVS;
path = CoolKey/CVS;
sourceTree = "<group>";
};
00A5CAC2111A358200EBA8FC /* mds */ = {
isa = PBXGroup;
children = (
00A5CAC3111A358200EBA8FC /* coolkey_csp_capabilities.mdsinfo */,
00A5CAC4111A358200EBA8FC /* coolkey_csp_capabilities_common.mds */,
00A5CAC5111A358200EBA8FC /* coolkey_csp_primary.mdsinfo */,
00A5CAC6111A358200EBA8FC /* coolkey_dl_primary.mdsinfo */,
00A5CAC7111A358200EBA8FC /* coolkey_smartcard.mdsinfo */,
);
name = mds;
path = CoolKey/mds;
sourceTree = "<group>";
};
00A5CAC8111A358200EBA8FC /* pkcs11 */ = {
isa = PBXGroup;
children = (
00A5CAC9111A358200EBA8FC /* compile.sh */,
00A5CACA111A358200EBA8FC /* cryptoki.h */,
00A5CACB111A358200EBA8FC /* mypkcs11.h */,
00A5CACC111A358200EBA8FC /* pkcs11.h */,
00A5CACD111A358200EBA8FC /* pkcs11f.h */,
00A5CACE111A358200EBA8FC /* pkcs11t.h */,
);
name = pkcs11;
path = CoolKey/pkcs11;
sourceTree = "<group>";
};
08FB7794FE84155DC02AAC07 /* TokendMuscle */ = {
isa = PBXGroup;
children = (
009F4D58111BACB400012078 /* CoolKey */,
00A5CAAC111A356200EBA8FC /* Tokend-35209 */,
5280675F0B78E86F00D02C3A /* PIV */,
4C86D39F070B4122006A0C7F /* BELPIC */,
4C3FACA806DBF84400D18D5F /* MuscleCard */,
4C134A8706DBF81800FA17D9 /* Tokend */,
4CA858F0065441220083DED3 /* External Frameworks */,
4C415098073061D6004C9490 /* External Libraries */,
1AB674ADFE9D54B511CA2CBB /* Products */,
52B260620BC5A864007E00F1 /* Info-tokend__Upgraded_.plist */,
);
name = TokendMuscle;
sourceTree = "<group>";
};
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
52B2604A0BC5A864007E00F1 /* libtokend.a */,
52B260630BC5A864007E00F1 /* tokend.framework */,
00A5CAFE111A373900EBA8FC /* COOLKEY.tokend */,
);
name = Products;
sourceTree = "<group>";
};
4C134A8706DBF81800FA17D9 /* Tokend */ = {
isa = PBXGroup;
children = (
4C1B9B6406DBF99F00014414 /* Adornment.cpp */,
4C1B9B6306DBF99F00014414 /* Adornment.h */,
4C134A9606DBF81800FA17D9 /* Attribute.cpp */,
4C134A9706DBF81800FA17D9 /* Attribute.h */,
4C134A8A06DBF81800FA17D9 /* AttributeCoder.cpp */,
4C134A8B06DBF81800FA17D9 /* AttributeCoder.h */,
4C134A9806DBF81800FA17D9 /* Cursor.cpp */,
4C134A9906DBF81800FA17D9 /* Cursor.h */,
4C134A9A06DBF81800FA17D9 /* DbValue.cpp */,
4C134A9B06DBF81800FA17D9 /* DbValue.h */,
4C3C166E06F61D6F00FC8AAC /* KeyHandle.cpp */,
4C3C166D06F61D6F00FC8AAC /* KeyHandle.h */,
4C134A9C06DBF81800FA17D9 /* MetaAttribute.cpp */,
4C134A9D06DBF81800FA17D9 /* MetaAttribute.h */,
4C134A9E06DBF81800FA17D9 /* MetaRecord.cpp */,
4C134A9F06DBF81800FA17D9 /* MetaRecord.h */,
52DE698206E93B870024EA03 /* PKCS11Object.cpp */,
52DE698106E93B870024EA03 /* PKCS11Object.h */,
4C134AA006DBF81800FA17D9 /* Record.cpp */,
4C134AA106DBF81800FA17D9 /* Record.h */,
4C55BAFC06DEABE500E4200A /* RecordHandle.cpp */,
4C55BAFB06DEABE500E4200A /* RecordHandle.h */,
4C134A8E06DBF81800FA17D9 /* Relation.cpp */,
4C134A8F06DBF81800FA17D9 /* Relation.h */,
4CC3947A0731A4DD00761DEE /* SCardError.cpp */,
4CC394790731A4DD00761DEE /* SCardError.h */,
4C134AA206DBF81800FA17D9 /* Schema.cpp */,
4C134AA306DBF81800FA17D9 /* Schema.h */,
4C134AA406DBF81800FA17D9 /* SelectionPredicate.cpp */,
4C134AA506DBF81800FA17D9 /* SelectionPredicate.h */,
4C134A9006DBF81800FA17D9 /* Token.cpp */,
4C134A9106DBF81800FA17D9 /* Token.h */,
4C134A9206DBF81800FA17D9 /* TokenContext.cpp */,
4C134A9306DBF81800FA17D9 /* TokenContext.h */,
);
path = Tokend;
sourceTree = "<group>";
};
4C134AA606DBF81800FA17D9 /* Msc */ = {
isa = PBXGroup;
children = (
4C134AAB06DBF81800FA17D9 /* MscACL.cpp */,
4C134AAC06DBF81800FA17D9 /* MscACL.h */,
4C134AA906DBF81800FA17D9 /* MscError.cpp */,
4C134AAA06DBF81800FA17D9 /* MscError.h */,
4C134AAF06DBF81800FA17D9 /* MscKey.cpp */,
4C134AB006DBF81800FA17D9 /* MscKey.h */,
4C134AB106DBF81800FA17D9 /* MscObject.cpp */,
4C134AB206DBF81800FA17D9 /* MscObject.h */,
4C134AB306DBF81800FA17D9 /* MscPIN.cpp */,
4C134AB406DBF81800FA17D9 /* MscPIN.h */,
4C134AB506DBF81800FA17D9 /* MscToken.cpp */,
4C134AB606DBF81800FA17D9 /* MscToken.h */,
4C134AB706DBF81800FA17D9 /* MscTokenConnection.cpp */,
4C134AB806DBF81800FA17D9 /* MscTokenConnection.h */,
4C134AB906DBF81800FA17D9 /* MscWrappers.cpp */,
4C134ABA06DBF81800FA17D9 /* MscWrappers.h */,
);
path = Msc;
sourceTree = "<group>";
};
4C3FACA806DBF84400D18D5F /* MuscleCard */ = {
isa = PBXGroup;
children = (
4C134AA606DBF81800FA17D9 /* Msc */,
4C5C1D280730664E00AECB7F /* mds */,
4C3FACAC06DBF84400D18D5F /* Info.plist */,
4CE2E6A406DC06AB00E21469 /* KeyRecord.cpp */,
4CE2E6A506DC06AB00E21469 /* KeyRecord.h */,
4C3FACAD06DBF84400D18D5F /* musclecard.cpp */,
4C1B9B5C06DBF96E00014414 /* MuscleCardAttributeCoder.cpp */,
4C1B9B5B06DBF96E00014414 /* MuscleCardAttributeCoder.h */,
4C253C0E06F66A6100B5CED6 /* MuscleCardKeyHandle.cpp */,
4C253C0D06F66A6100B5CED6 /* MuscleCardKeyHandle.h */,
4C1B9B8906DBFEE200014414 /* MuscleCardSchema.cpp */,
4C1B9B8806DBFEE200014414 /* MuscleCardSchema.h */,
4C3FACAE06DBF84400D18D5F /* MuscleCardToken.cpp */,
4C3FACAF06DBF84400D18D5F /* MuscleCardToken.h */,
4C63F7A506DC052A00CB6F22 /* TokenRecord.cpp */,
4C63F7A606DC052A00CB6F22 /* TokenRecord.h */,
);
path = MuscleCard;
sourceTree = "<group>";
};
4C415098073061D6004C9490 /* External Libraries */ = {
isa = PBXGroup;
children = (
4CBF5CBE0704E76200EEADC2 /* libz.dylib */,
);
name = "External Libraries";
sourceTree = "<group>";
};
4C5C1CE0073065EA00AECB7F /* mds */ = {
isa = PBXGroup;
children = (
4C5C1CE8073065EA00AECB7F /* belpic_csp_capabilities.mdsinfo */,
4C5C1CE9073065EA00AECB7F /* belpic_csp_capabilities_common.mds */,
4C5C1CEA073065EA00AECB7F /* belpic_csp_primary.mdsinfo */,
4C5C1CEB073065EA00AECB7F /* belpic_dl_primary.mdsinfo */,
4C5C1CEC073065EA00AECB7F /* belpic_smartcard.mdsinfo */,
);
name = mds;
path = BELPIC/mds;
sourceTree = SOURCE_ROOT;
};
4C5C1D280730664E00AECB7F /* mds */ = {
isa = PBXGroup;
children = (
4C5C1D300730664E00AECB7F /* musclecard_csp_capabilities.mdsinfo */,
4C5C1D310730664E00AECB7F /* musclecard_csp_capabilities_common.mds */,
4C5C1D320730664E00AECB7F /* musclecard_csp_primary.mdsinfo */,
4C5C1D330730664E00AECB7F /* musclecard_dl_primary.mdsinfo */,
4C5C1D340730664E00AECB7F /* musclecard_smartcard.mdsinfo */,
);
name = mds;
path = MuscleCard/mds;
sourceTree = SOURCE_ROOT;
};
4C86D39F070B4122006A0C7F /* BELPIC */ = {
isa = PBXGroup;
children = (
4C5C1CE0073065EA00AECB7F /* mds */,
4C86D3A0070B4122006A0C7F /* belpic.cpp */,
4C86D3A3070B4122006A0C7F /* BELPICError.cpp */,
4C86D3A4070B4122006A0C7F /* BELPICError.h */,
4C86D3A5070B4122006A0C7F /* BELPICKeyHandle.cpp */,
4C86D3A6070B4122006A0C7F /* BELPICKeyHandle.h */,
4C86D3A7070B4122006A0C7F /* BELPICRecord.cpp */,
4C86D3A8070B4122006A0C7F /* BELPICRecord.h */,
4C86D3A9070B4122006A0C7F /* BELPICSchema.cpp */,
4C86D3AA070B4122006A0C7F /* BELPICSchema.h */,
4C86D3AB070B4122006A0C7F /* BELPICToken.cpp */,
4C86D3AC070B4122006A0C7F /* BELPICToken.h */,
4C86D3AD070B4122006A0C7F /* Info.plist */,
);
path = BELPIC;
sourceTree = "<group>";
};
4CA858F0065441220083DED3 /* External Frameworks */ = {
isa = PBXGroup;
children = (
4CA8C4D606D6D19400F1BCC8 /* CoreFoundation.framework */,
523F79EC06D5AC27004256A0 /* security_cdsa_client.framework */,
523F79ED06D5AC27004256A0 /* security_cdsa_utilities.framework */,
523F79EE06D5AC27004256A0 /* security_utilities.framework */,
52CA8342067E8175005A1EBA /* PCSC.framework */,
52CA8343067E8175005A1EBA /* Security.framework */,
4CA858F10654413F0083DED3 /* SecurityTokend.framework */,
);
name = "External Frameworks";
sourceTree = "<group>";
};
5280675F0B78E86F00D02C3A /* PIV */ = {
isa = PBXGroup;
children = (
52E66B8E0E92E78700CDE046 /* byte_string.h */,
52E66B8F0E92E78700CDE046 /* Padding.cpp */,
52E66B900E92E78700CDE046 /* Padding.h */,
52E66B910E92E78700CDE046 /* PIVUtilities.h */,
52E66B920E92E78700CDE046 /* SecureBufferAllocator.h */,
52E66B930E92E78700CDE046 /* SecureBufferAllocator.inc */,
52E66B940E92E78700CDE046 /* TLV.cpp */,
52E66B950E92E78700CDE046 /* TLV.h */,
52E66B960E92E78700CDE046 /* TLV.inc */,
528067800B78E98600D02C3A /* mds */,
529D9A7B0B867FA900DBFA4B /* PIVCCC.cpp */,
529D9A7C0B867FA900DBFA4B /* PIVCCC.h */,
523C07E70B7B940D00067DEA /* PIVDefines.h */,
5280677F0B78E98600D02C3A /* Info.plist */,
528067860B78E98600D02C3A /* piv.cpp */,
528067870B78E98600D02C3A /* PIVAttributeCoder.cpp */,
528067880B78E98600D02C3A /* PIVAttributeCoder.h */,
528067890B78E98600D02C3A /* PIVError.cpp */,
5280678A0B78E98600D02C3A /* PIVError.h */,
5280678B0B78E98600D02C3A /* PIVKeyHandle.cpp */,
5280678C0B78E98600D02C3A /* PIVKeyHandle.h */,
5280678D0B78E98600D02C3A /* PIVRecord.cpp */,
5280678E0B78E98600D02C3A /* PIVRecord.h */,
5280678F0B78E98600D02C3A /* PIVSchema.cpp */,
528067900B78E98600D02C3A /* PIVSchema.h */,
528067910B78E98600D02C3A /* PIVToken.cpp */,
528067920B78E98600D02C3A /* PIVToken.h */,
);
name = PIV;
sourceTree = "<group>";
};
528067800B78E98600D02C3A /* mds */ = {
isa = PBXGroup;
children = (
528067810B78E98600D02C3A /* piv_csp_capabilities.mdsinfo */,
528067820B78E98600D02C3A /* piv_csp_capabilities_common.mds */,
528067830B78E98600D02C3A /* piv_csp_primary.mdsinfo */,
528067840B78E98600D02C3A /* piv_dl_primary.mdsinfo */,
528067850B78E98600D02C3A /* piv_smartcard.mdsinfo */,
);
name = mds;
path = PIV/mds;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
52B2604C0BC5A864007E00F1 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
52B2604D0BC5A864007E00F1 /* Adornment.h in Headers */,
52B2604E0BC5A864007E00F1 /* Attribute.h in Headers */,
52B2604F0BC5A864007E00F1 /* AttributeCoder.h in Headers */,
52B260500BC5A864007E00F1 /* Cursor.h in Headers */,
52B260510BC5A864007E00F1 /* DbValue.h in Headers */,
52B260520BC5A864007E00F1 /* KeyHandle.h in Headers */,
52B260530BC5A864007E00F1 /* MetaAttribute.h in Headers */,
52B260540BC5A864007E00F1 /* MetaRecord.h in Headers */,
52B260550BC5A864007E00F1 /* Record.h in Headers */,
52B260560BC5A864007E00F1 /* RecordHandle.h in Headers */,
52B260570BC5A864007E00F1 /* Relation.h in Headers */,
52B260580BC5A864007E00F1 /* SCardError.h in Headers */,
52B260590BC5A864007E00F1 /* Schema.h in Headers */,
52B2605A0BC5A864007E00F1 /* SelectionPredicate.h in Headers */,
52B2605B0BC5A864007E00F1 /* Token.h in Headers */,
52B2605C0BC5A864007E00F1 /* TokenContext.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
00A5CAE7111A373900EBA8FC /* COOLKEY */ = {
isa = PBXNativeTarget;
buildConfigurationList = 00A5CAFB111A373900EBA8FC /* Build configuration list for PBXNativeTarget "COOLKEY" */;
buildPhases = (
00A5CAEA111A373900EBA8FC /* Resources */,
00A5CAF0111A373900EBA8FC /* Sources */,
00A5CAF8111A373900EBA8FC /* Frameworks */,
);
buildRules = (
);
dependencies = (
00A5CAE8111A373900EBA8FC /* PBXTargetDependency */,
);
name = COOLKEY;
productName = "Common Access Card";
productReference = 00A5CAFE111A373900EBA8FC /* COOLKEY.tokend */;
productType = "com.apple.product-type.application";
};
52B2602D0BC5A864007E00F1 /* libtokend */ = {
isa = PBXNativeTarget;
buildConfigurationList = 52B260450BC5A864007E00F1 /* Build configuration list for PBXNativeTarget "libtokend" */;
buildPhases = (
52B260310BC5A864007E00F1 /* Sources */,
52B260430BC5A864007E00F1 /* ShellScript */,
52B260440BC5A864007E00F1 /* ShellScript */,
);
buildRules = (
);
dependencies = (
52B260DF0BC5A864007E00F1 /* PBXTargetDependency */,
);
name = libtokend;
productName = libtokend;
productReference = 52B2604A0BC5A864007E00F1 /* libtokend.a */;
productType = "com.apple.product-type.library.static";
};
52B2604B0BC5A864007E00F1 /* tokend */ = {
isa = PBXNativeTarget;
buildConfigurationList = 52B2605D0BC5A864007E00F1 /* Build configuration list for PBXNativeTarget "tokend" */;
buildPhases = (
52B2604C0BC5A864007E00F1 /* Headers */,
);
buildRules = (
);
dependencies = (
);
name = tokend;
productName = tokend;
productReference = 52B260630BC5A864007E00F1 /* tokend.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C27AD2220987FCDC001272E0 /* Build configuration list for PBXProject "Tokend" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* TokendMuscle */;
projectDirPath = "";
projectRoot = "";
targets = (
00A5CAE7111A373900EBA8FC /* COOLKEY */,
52B2601F0BC5A864007E00F1 /* world */,
52B2602D0BC5A864007E00F1 /* libtokend */,
52B2604B0BC5A864007E00F1 /* tokend */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
00A5CAEA111A373900EBA8FC /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
009F4D82111BACB400012078 /* coolkey_csp_capabilities.mdsinfo in Resources */,
009F4D83111BACB400012078 /* coolkey_csp_capabilities_common.mds in Resources */,
009F4D84111BACB400012078 /* coolkey_csp_primary.mdsinfo in Resources */,
009F4D85111BACB400012078 /* coolkey_dl_primary.mdsinfo in Resources */,
009F4D86111BACB400012078 /* coolkey_smartcard.mdsinfo in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
52B260430BC5A864007E00F1 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "for variant in ${BUILD_VARIANTS}\ndo\n\tpostfix=`echo _${variant} | sed 's/_normal//'`\n\tfrmwk=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework\"\n\tversa=\"${frmwk}/Versions/A\"\n\tcp \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}${postfix}.a\" \"${versa}/${PRODUCT_NAME}${postfix}\"\n\tln -fs \"${versa}/${PRODUCT_NAME}${postfix}\" ${frmwk}/${PRODUCT_NAME}${postfix}\n\tnmedit -p \"${versa}/${PRODUCT_NAME}${postfix}\"\n\tranlib \"${versa}/${PRODUCT_NAME}${postfix}\"\ndone";
showEnvVarsInLog = 0;
};
52B260440BC5A864007E00F1 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = "for variant in ${BUILD_VARIANTS}\ndo\n\tpostfix=`echo _${variant} | sed 's/_normal//'`\n\tcp -p \"${SYMROOT}/${PRODUCT_NAME}${postfix}\" \"${DSTROOT}/usr/local/SecurityPieces/Frameworks/${PRODUCT_NAME}.framework/Versions/A\"\n\tranlib \"${DSTROOT}/usr/local/SecurityPieces/Frameworks/${PRODUCT_NAME}.framework/Versions/A/${PRODUCT_NAME}${postfix}\"\n\tln -fs \"Versions/Current/${PRODUCT_NAME}${postfix}\" \"${DSTROOT}/usr/local/SecurityPieces/Frameworks/${PRODUCT_NAME}.framework\"\ndone";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
00A5CAF0111A373900EBA8FC /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
009F4D78111BACB400012078 /* coolkey.cpp in Sources */,
009F4D79111BACB400012078 /* CoolKeyAttributeCoder.cpp in Sources */,
009F4D7A111BACB400012078 /* CoolKeyError.cpp in Sources */,
009F4D7B111BACB400012078 /* CoolKeyHandle.cpp in Sources */,
009F4D7C111BACB400012078 /* CoolKeyPK11.cpp in Sources */,
009F4D7D111BACB400012078 /* CoolKeyRecord.cpp in Sources */,
009F4D7E111BACB400012078 /* CoolKeySchema.cpp in Sources */,
009F4D7F111BACB400012078 /* CoolKeyToken.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
52B260310BC5A864007E00F1 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
52B260320BC5A864007E00F1 /* Adornment.cpp in Sources */,
52B260330BC5A864007E00F1 /* Attribute.cpp in Sources */,
52B260340BC5A864007E00F1 /* AttributeCoder.cpp in Sources */,
52B260350BC5A864007E00F1 /* Cursor.cpp in Sources */,
52B260360BC5A864007E00F1 /* DbValue.cpp in Sources */,
52B260370BC5A864007E00F1 /* KeyHandle.cpp in Sources */,
52B260380BC5A864007E00F1 /* MetaAttribute.cpp in Sources */,
52B260390BC5A864007E00F1 /* MetaRecord.cpp in Sources */,
52B2603A0BC5A864007E00F1 /* Record.cpp in Sources */,
52B2603B0BC5A864007E00F1 /* RecordHandle.cpp in Sources */,
52B2603C0BC5A864007E00F1 /* Relation.cpp in Sources */,
52B2603D0BC5A864007E00F1 /* SCardError.cpp in Sources */,
52B2603E0BC5A864007E00F1 /* Schema.cpp in Sources */,
52B2603F0BC5A864007E00F1 /* SelectionPredicate.cpp in Sources */,
52B260400BC5A864007E00F1 /* Token.cpp in Sources */,
52B260410BC5A864007E00F1 /* TokenContext.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
00A5CAE8111A373900EBA8FC /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 52B2602D0BC5A864007E00F1 /* libtokend */;
targetProxy = 00A5CAE9111A373900EBA8FC /* PBXContainerItemProxy */;
};
529252170BC6BEED00816597 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 52B2602D0BC5A864007E00F1 /* libtokend */;
targetProxy = 529252160BC6BEED00816597 /* PBXContainerItemProxy */;
};
52B260DF0BC5A864007E00F1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 52B2604B0BC5A864007E00F1 /* tokend */;
targetProxy = 52B260DE0BC5A864007E00F1 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
00A5CAFC111A373900EBA8FC /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
BUILD_VARIANTS = debug;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 35209;
FRAMEWORK_SEARCH_PATHS = (
/usr/local/SecurityPieces/Frameworks,
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MISSING_PARENTHESES = YES;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_PEDANTIC = NO;
GCC_WARN_SHADOW = NO;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_WARN_UNINITIALIZED_AUTOS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = CoolKey/Info.plist;
INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Security/tokend";
OPT_CPPXFLAGS = "$(OPT_CXFLAGS) -fno-enforce-eh-specs -fno-implement-inlines";
OPT_CXFLAGS = "-DNDEBUG $(OPT_INLINEXFLAGS)";
OPT_INLINEXFLAGS = " -finline-functions";
OPT_LDXFLAGS = "-dead_strip";
OPT_LDXNOPIC = ",_nopic";
OTHER_ASFLAGS_debug = "$(OTHER_CFLAGS)";
OTHER_ASFLAGS_normal = "$(OTHER_CFLAGS) -DNDEBUG";
OTHER_ASFLAGS_profile = "-DNDEBUG $(OTHER_CFLAGS) -pg";
OTHER_CFLAGS_debug = "$(OTHER_CFLAGS) -O0 -fno-inline";
OTHER_CFLAGS_normal = "$(OPT_CXFLAGS) $(OTHER_CFLAGS)";
OTHER_CFLAGS_profile = "$(OPT_CXFLAGS) $(OTHER_CFLAGS) -pg";
OTHER_CPLUSPLUSFLAGS_debug = "$(OTHER_CPLUSPLUSFLAGS) -O0 -fno-inline";
OTHER_CPLUSPLUSFLAGS_normal = "$(OPT_CPPXFLAGS) $(OTHER_CPLUSPLUSFLAGS)";
OTHER_CPLUSPLUSFLAGS_profile = "$(OPT_CPPXFLAGS) $(OTHER_CPLUSPLUSFLAGS) -pg";
OTHER_LDFLAGS_debug = "$(OTHER_LDFLAGS) -framework tokend,_debug -framework PCSC,_debug -framework SecurityTokend,_debug -framework Security,_debug -framework security_cdsa_client,_debug -framework security_cdsa_utilities,_debug -framework security_utilities,_debug";
OTHER_LDFLAGS_normal = "$(OPT_LDXFLAGS) $(OTHER_LDFLAGS) -framework tokend -framework PCSC -framework SecurityTokend -framework Security -framework security_cdsa_client$(OPT_LDXNOPIC) -framework security_cdsa_utilities$(OPT_LDXNOPIC) -framework security_utilities$(OPT_LDXNOPIC)";
OTHER_LDFLAGS_profile = "$(OPT_LDXFLAGS) $(OTHER_LDFLAGS) -pg -framework tokend,_profile -framework PCSC,_profile -framework SecurityTokend,_profile -framework Security,_profile -framework security_cdsa_client,_profile -framework security_cdsa_utilities,_profile -framework security_utilities,_profile";
PRODUCT_NAME = COOLKEY;
VERSIONING_SYSTEM = "apple-generic";
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
WRAPPER_EXTENSION = tokend;
ZERO_LINK = NO;
};
name = Development;
};
00A5CAFD111A373900EBA8FC /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUILD_VARIANTS = (
normal,
debug,
);
CURRENT_PROJECT_VERSION = 35209;
FRAMEWORK_SEARCH_PATHS = (
/usr/local/SecurityPieces/Frameworks,
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
);
GCC_DYNAMIC_NO_PIC = YES;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
INFOPLIST_FILE = CoolKey/Info.plist;
INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Security/tokend";
OPT_CPPXFLAGS = "$(OPT_CXFLAGS) -fno-enforce-eh-specs -fno-implement-inlines";
OPT_CXFLAGS = "-DNDEBUG $(OPT_INLINEXFLAGS)";
OPT_INLINEXFLAGS = " -finline-functions";
OPT_LDXFLAGS = "-dead_strip";
OPT_LDXNOPIC = ",_nopic";
OTHER_ASFLAGS_debug = "$(OTHER_CFLAGS)";
OTHER_ASFLAGS_normal = "$(OTHER_CFLAGS) -DNDEBUG";
OTHER_ASFLAGS_profile = "-DNDEBUG $(OTHER_CFLAGS) -pg";
OTHER_CFLAGS_debug = "$(OTHER_CFLAGS) -O0 -fno-inline";
OTHER_CFLAGS_normal = "$(OPT_CXFLAGS) $(OTHER_CFLAGS)";
OTHER_CFLAGS_profile = "$(OPT_CXFLAGS) $(OTHER_CFLAGS) -pg";
OTHER_CPLUSPLUSFLAGS_debug = "$(OTHER_CPLUSPLUSFLAGS) -O0 -fno-inline";
OTHER_CPLUSPLUSFLAGS_normal = "$(OPT_CPPXFLAGS) $(OTHER_CPLUSPLUSFLAGS)";
OTHER_CPLUSPLUSFLAGS_profile = "$(OPT_CPPXFLAGS) $(OTHER_CPLUSPLUSFLAGS) -pg";
OTHER_LDFLAGS_debug = "$(OTHER_LDFLAGS) -framework tokend,_debug -framework PCSC,_debug -framework SecurityTokend,_debug -framework Security,_debug -framework security_cdsa_client,_debug -framework security_cdsa_utilities,_debug -framework security_utilities,_debug";
OTHER_LDFLAGS_normal = "$(OPT_LDXFLAGS) $(OTHER_LDFLAGS) -framework tokend -framework PCSC -framework SecurityTokend -framework Security -framework security_cdsa_client$(OPT_LDXNOPIC) -framework security_cdsa_utilities$(OPT_LDXNOPIC) -framework security_utilities$(OPT_LDXNOPIC)";
OTHER_LDFLAGS_profile = "$(OPT_LDXFLAGS) $(OTHER_LDFLAGS) -pg -framework tokend,_profile -framework PCSC,_profile -framework SecurityTokend,_profile -framework Security,_profile -framework security_cdsa_client,_profile -framework security_cdsa_utilities,_profile -framework security_utilities,_profile";
PRODUCT_NAME = COOLKEY;
VERSIONING_SYSTEM = "apple-generic";
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
WRAPPER_EXTENSION = tokend;
ZERO_LINK = NO;
};
name = Deployment;
};
52B260290BC5A864007E00F1 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUILD_VARIANTS = debug;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MISSING_PARENTHESES = YES;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_PEDANTIC = NO;
GCC_WARN_SHADOW = NO;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_WARN_UNINITIALIZED_AUTOS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PRODUCT_NAME = world;
SECTORDER_FLAGS = "";
ZERO_LINK = NO;
};
name = Development;
};
52B2602A0BC5A864007E00F1 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PRODUCT_NAME = world;
SECTORDER_FLAGS = "";
ZERO_LINK = NO;
};
name = Deployment;
};
52B260460BC5A864007E00F1 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUILD_VARIANTS = debug;
CURRENT_PROJECT_VERSION = 35209;
FRAMEWORK_SEARCH_PATHS = (
/usr/local/SecurityPieces/Frameworks,
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_PREPROCESSOR_DEFINITIONS = LIMITED_SIGNING;
LIBRARY_STYLE = STATIC;
OPT_CFLAGS = "-DNDEBUG -Os $(OPT_INLINEFLAGS)";
OPT_CPPFLAGS = "$(OPT_CFLAGS)";
OPT_INLINEFLAGS = "-finline-functions";
OPT_LDFLAGS = "-dead_strip";
OTHER_ASFLAGS_debug = "$(OTHER_CFLAGS)";
OTHER_ASFLAGS_normal = "-DNDEBUG $(OTHER_CFLAGS)";
OTHER_ASFLAGS_profile = "-DNDEBUG $(OTHER_CFLAGS) -pg";
OTHER_CFLAGS = "";
OTHER_CFLAGS_debug = "$(OTHER_CFLAGS) -O0 -fno-inline";
OTHER_CFLAGS_nopic = "-mdynamic-no-pic $(OPT_CFLAGS) $(OTHER_CFLAGS)";
OTHER_CFLAGS_normal = "$(OPT_CFLAGS) $(OTHER_CFLAGS)";
OTHER_CFLAGS_profile = "$(OPT_CFLAGS) $(OTHER_CFLAGS) -pg";
OTHER_CPLUSPLUSFLAGS_debug = "$(OTHER_CFLAGS) -O0 -fno-inline";
OTHER_CPLUSPLUSFLAGS_nopic = "-mdynamic-no-pic $(OPT_CPPFLAGS) $(OTHER_CFLAGS)";
OTHER_CPLUSPLUSFLAGS_normal = "$(OPT_CPPFLAGS) $(OTHER_CFLAGS)";
OTHER_CPLUSPLUSFLAGS_profile = "$(OPT_CPPFLAGS) $(OTHER_CFLAGS) -pg";
OTHER_LDFLAGS_debug = "$(OTHER_LDFLAGS)";
OTHER_LDFLAGS_nopic = "$(OPT_LDFLAGS) $(OTHER_LDFLAGS)";
OTHER_LDFLAGS_normal = "$(OPT_LDFLAGS) $(OTHER_LDFLAGS)";
OTHER_LDFLAGS_profile = "$(OPT_LDFLAGS) $(OTHER_LDFLAGS) -pg";
PRODUCT_NAME = tokend;
VERSIONING_SYSTEM = "apple-generic";
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
ZERO_LINK = YES;
};
name = Development;
};
52B260470BC5A864007E00F1 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUILD_VARIANTS = (
normal,
debug,
nopic,
);
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 35209;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/usr/local/SecurityPieces/Frameworks,
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
);
GCC_DEBUGGING_SYMBOLS = default;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_PREPROCESSOR_DEFINITIONS = LIMITED_SIGNING;
LIBRARY_STYLE = STATIC;
OPT_CFLAGS = "-DNDEBUG -Os $(OPT_INLINEFLAGS)";
OPT_CPPFLAGS = "$(OPT_CFLAGS)";
OPT_INLINEFLAGS = "-finline-functions";
OPT_LDFLAGS = "-dead_strip";
OTHER_ASFLAGS_debug = "$(OTHER_CFLAGS)";
OTHER_ASFLAGS_normal = "-DNDEBUG $(OTHER_CFLAGS)";
OTHER_ASFLAGS_profile = "-DNDEBUG $(OTHER_CFLAGS) -pg";
OTHER_CFLAGS = "";
OTHER_CFLAGS_debug = "$(OTHER_CFLAGS) -O0 -fno-inline";
OTHER_CFLAGS_nopic = "-mdynamic-no-pic $(OPT_CFLAGS) $(OTHER_CFLAGS)";
OTHER_CFLAGS_normal = "$(OPT_CFLAGS) $(OTHER_CFLAGS)";
OTHER_CFLAGS_profile = "\U0001$(OPT_CFLAGS) $(OTHER_CFLAGS) -pg";
OTHER_CPLUSPLUSFLAGS_debug = "$(OTHER_CFLAGS) -O0 -fno-inline";
OTHER_CPLUSPLUSFLAGS_nopic = "-mdynamic-no-pic $(OPT_CPPFLAGS) $(OTHER_CFLAGS)";
OTHER_CPLUSPLUSFLAGS_normal = "$(OPT_CPPFLAGS) $(OTHER_CFLAGS)";
OTHER_CPLUSPLUSFLAGS_profile = "$(OPT_CPPFLAGS) $(OTHER_CFLAGS) -pg";
OTHER_LDFLAGS_debug = "$(OTHER_LDFLAGS)";
OTHER_LDFLAGS_nopic = "-dead_strip $(OPT_LDFLAGS) $(OTHER_LDFLAGS)";
OTHER_LDFLAGS_normal = "$(OPT_LDFLAGS) $(OTHER_LDFLAGS)";
OTHER_LDFLAGS_profile = "$(OPT_LDFLAGS) $(OTHER_LDFLAGS) -pg";
PRODUCT_NAME = tokend;
VERSIONING_SYSTEM = "apple-generic";
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
ZERO_LINK = NO;
};
name = Deployment;
};
52B2605E0BC5A864007E00F1 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/usr/local/SecurityPieces/Frameworks,
"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
);
FRAMEWORK_VERSION = A;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
INFOPLIST_FILE = "Info-tokend__Upgraded_.plist";
INSTALL_PATH = /usr/local/SecurityPieces/Frameworks;
PRODUCT_NAME = tokend;
WRAPPER_EXTENSION = framework;
ZERO_LINK = YES;
};
name = Development;
};
52B2605F0BC5A864007E00F1 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_VERSION = A;
GCC_DEBUGGING_SYMBOLS = default;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
INFOPLIST_FILE = "Info-tokend__Upgraded_.plist";
INSTALL_PATH = /usr/local/SecurityPieces/Frameworks;
PRODUCT_NAME = tokend;
WRAPPER_EXTENSION = framework;
ZERO_LINK = NO;
};
name = Deployment;
};
C27AD2230987FCDC001272E0 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)";
};
name = Development;
};
C27AD2240987FCDC001272E0 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)";
};
name = Deployment;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
00A5CAFB111A373900EBA8FC /* Build configuration list for PBXNativeTarget "COOLKEY" */ = {
isa = XCConfigurationList;
buildConfigurations = (
00A5CAFC111A373900EBA8FC /* Development */,
00A5CAFD111A373900EBA8FC /* Deployment */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Deployment;
};
52B260280BC5A864007E00F1 /* Build configuration list for PBXAggregateTarget "world" */ = {
isa = XCConfigurationList;
buildConfigurations = (
52B260290BC5A864007E00F1 /* Development */,
52B2602A0BC5A864007E00F1 /* Deployment */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Deployment;
};
52B260450BC5A864007E00F1 /* Build configuration list for PBXNativeTarget "libtokend" */ = {
isa = XCConfigurationList;
buildConfigurations = (
52B260460BC5A864007E00F1 /* Development */,
52B260470BC5A864007E00F1 /* Deployment */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Deployment;
};
52B2605D0BC5A864007E00F1 /* Build configuration list for PBXNativeTarget "tokend" */ = {
isa = XCConfigurationList;
buildConfigurations = (
52B2605E0BC5A864007E00F1 /* Development */,
52B2605F0BC5A864007E00F1 /* Deployment */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Deployment;
};
C27AD2220987FCDC001272E0 /* Build configuration list for PBXProject "Tokend" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C27AD2230987FCDC001272E0 /* Development */,
C27AD2240987FCDC001272E0 /* Deployment */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Deployment;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
}
14 years
esc/mac/Tokend-35209/CoolKey/pkcs11 compile.sh, NONE, 1.1 cryptoki.h, NONE, 1.1 mypkcs11.h, NONE, 1.1 pkcs11.h, NONE, 1.1 pkcs11f.h, NONE, 1.1 pkcs11t.h, NONE, 1.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/CoolKey/pkcs11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16499/CoolKey/pkcs11
Added Files:
compile.sh cryptoki.h mypkcs11.h pkcs11.h pkcs11f.h pkcs11t.h
Log Message:
Add directory for Tokend-35209 for Leopard.
--- NEW FILE compile.sh ---
#! /bin/csh
gcc -Ipkcs11 $argv[1]
***** Error reading new file: [Errno 2] No such file or directory: 'cryptoki.h'
--- NEW FILE mypkcs11.h ---
// ****************************************************************************
//
// Copyright (c) 2003 America Online, Inc. All rights reserved.
// This software contains valuable confidential and proprietary information
// of America Online, Inc. and is subject to applicable licensing agreements.
// Unauthorized reproduction, transmission or distribution of this file and
// its contents is a violation of applicable laws.
//
// A M E R I C A O N L I N E C O N F I D E N T I A L
//
// ****************************************************************************
#ifndef AOL_NKEY_MYPKCS11_H
#define AOL_NKEY_MYPKCS11_H
#if defined(_WIN32)
#define CK_PTR *
#define CK_DECLARE_FUNCTION(rv,func) rv __declspec(dllexport) func
#define CK_DECLARE_FUNCTION_POINTER(rv,func) rv (* func)
#define CK_CALLBACK_FUNCTION(rv,func) rv (* func)
#define CK_NULL_PTR 0
#else
#define CK_PTR *
#define CK_DECLARE_FUNCTION(rv,func) rv func
#define CK_DECLARE_FUNCTION_POINTER(rv,func) rv (* func)
#define CK_CALLBACK_FUNCTION(rv,func) rv (* func)
#define CK_NULL_PTR 0
#endif
#if defined(_WIN32)
#pragma warning(disable:4103)
#pragma pack(push, cryptoki, 1)
#endif
#include "pkcs11.h"
//#include "pkcs11n.h"
#if defined (_WIN32)
#pragma warning(disable:4103)
#pragma pack(pop, cryptoki)
#endif
#endif
***** Error reading new file: [Errno 2] No such file or directory: 'pkcs11.h'
***** Error reading new file: [Errno 2] No such file or directory: 'pkcs11f.h'
***** Error reading new file: [Errno 2] No such file or directory: 'pkcs11t.h'
14 years
esc/mac/Tokend-35209/CoolKey/mds coolkey_csp_capabilities.mdsinfo, NONE, 1.1 coolkey_csp_capabilities_common.mds, NONE, 1.1 coolkey_csp_primary.mdsinfo, NONE, 1.1 coolkey_dl_primary.mdsinfo, NONE, 1.1 coolkey_smartcard.mdsinfo, NONE, 1.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/CoolKey/mds
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16499/CoolKey/mds
Added Files:
coolkey_csp_capabilities.mdsinfo
coolkey_csp_capabilities_common.mds
coolkey_csp_primary.mdsinfo coolkey_dl_primary.mdsinfo
coolkey_smartcard.mdsinfo
Log Message:
Add directory for Tokend-35209 for Leopard.
--- NEW FILE coolkey_csp_capabilities.mdsinfo ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>Capabilities</key>
<string>file:coolkey_csp_capabilities_common.mds</string>
<key>MdsFileDescription</key>
<string>CoolKey Token CSPDL CSP Capabilities</string>
<key>MdsFileType</key>
<string>PluginSpecific</string>
<key>MdsRecordType</key>
<string>MDS_CDSADIR_CSP_CAPABILITY_RECORDTYPE</string>
</dict>
</plist>
--- NEW FILE coolkey_csp_capabilities_common.mds ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_SHA1</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_OUTPUT_SIZE</string>
<key>AttributeValue</key>
<integer>20</integer>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_DIGEST</string>
<key>Description</key>
<string>SHA1 Digest</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_MD5</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_OUTPUT_SIZE</string>
<key>AttributeValue</key>
<integer>16</integer>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_DIGEST</string>
<key>Description</key>
<string>MD5 Digest</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_MD2</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_OUTPUT_SIZE</string>
<key>AttributeValue</key>
<integer>16</integer>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_DIGEST</string>
<key>Description</key>
<string>MD2 Digest</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_RSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>RSA Key Pair Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_DES</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_KEY_LENGTH</string>
<key>AttributeValue</key>
<integer>64</integer>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>DES Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_3DES_3KEY</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_KEY_LENGTH</string>
<key>AttributeValue</key>
<integer>192</integer>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>3DES Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_RC2</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>RC2 Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_RC4</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>RC4 Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_RC5</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>RC5 Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_CAST</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>New item</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>CAST Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_BLOWFISH</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>Blowfish Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_SHA1HMAC</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>SHA1HMAC Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_MD5HMAC</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>MD5HMAC Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_AES</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_KEY_LENGTH</string>
<key>AttributeValue</key>
<array>
<integer>128</integer>
<integer>192</integer>
<integer>256</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>AES Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_ASC</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>ASC Key Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_FEE</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_KEY_LENGTH</string>
<key>AttributeValue</key>
<array>
<integer>31</integer>
<integer>127</integer>
<integer>128</integer>
<integer>161</integer>
<integer>192</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>FEE Key Pair Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_DSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_KEYGEN</string>
<key>Description</key>
<string>DSA Key Pair Generation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_PKCS5_PBKDF2</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_DERIVEKEY</string>
<key>Description</key>
<string>PKCS5 Key Derivation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_PKCS5_PBKDF1_MD5</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_DERIVEKEY</string>
<key>Description</key>
<string>PKCS5 PBKDF1 MD5 Key Derivation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_PKCS5_PBKDF1_MD2</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_DERIVEKEY</string>
<key>Description</key>
<string>PKCS5 PBKDF1 MD2 Key Derivation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_PKCS5_PBKDF1_SHA1</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_DERIVEKEY</string>
<key>Description</key>
<string>PKCS5 PBKDF1 SHA1 Key Derivation</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_DES</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_MODE</string>
<key>AttributeValue</key>
<array>
<integer>2</integer>
<integer>3</integer>
<integer>5</integer>
<integer>6</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SYMMETRIC</string>
<key>Description</key>
<string>DES Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_3DES_3KEY_EDE</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_MODE</string>
<key>AttributeValue</key>
<array>
<integer>2</integer>
<integer>3</integer>
<integer>5</integer>
<integer>6</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SYMMETRIC</string>
<key>Description</key>
<string>3DES EDE Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_AES</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_MODE</string>
<key>AttributeValue</key>
<array>
<integer>2</integer>
<integer>3</integer>
<integer>5</integer>
<integer>6</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SYMMETRIC</string>
<key>Description</key>
<string>AES Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_RC4</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_MODE</string>
<key>AttributeValue</key>
<array>
<integer>0</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SYMMETRIC</string>
<key>Description</key>
<string>RC4 Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_RC5</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_MODE</string>
<key>AttributeValue</key>
<array>
<integer>2</integer>
<integer>3</integer>
<integer>5</integer>
<integer>6</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SYMMETRIC</string>
<key>Description</key>
<string>RC5 Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_BLOWFISH</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_MODE</string>
<key>AttributeValue</key>
<array>
<integer>2</integer>
<integer>3</integer>
<integer>5</integer>
<integer>6</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SYMMETRIC</string>
<key>Description</key>
<string>Blowfish Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_CAST</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_MODE</string>
<key>AttributeValue</key>
<array>
<integer>2</integer>
<integer>3</integer>
<integer>5</integer>
<integer>6</integer>
</array>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SYMMETRIC</string>
<key>Description</key>
<string>CAST Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_RSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_ASYMMETRIC</string>
<key>Description</key>
<string>RSA Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_FEEDEXP</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_ASYMMETRIC</string>
<key>Description</key>
<string>FEEDExp Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_FEED</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_ASYMMETRIC</string>
<key>Description</key>
<string>FEED Encryption</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_SHA1WithRSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>SHA1 With RSA Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_MD5WithRSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>MD5 With RSA Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_MD2WithRSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>MD2 With RSA Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_RSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>Raw RSA Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_SHA1WithDSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>SHA1 With DSA Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_DSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>Raw DSA Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_FEE_MD5</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>MD5 with FEE Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_FEE_SHA1</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>SHA1 with FEE Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_FEE</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>Raw FEE Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_SHA1WithECDSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>SHA1 with ECDSA Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_ECDSA</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_SIGNATURE</string>
<key>Description</key>
<string>Raw ECDSA Signature</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_SHA1HMAC</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_OUTPUT_SIZE</string>
<key>AttributeValue</key>
<integer>20</integer>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_MAC</string>
<key>Description</key>
<string>SHA1HMAC MAC</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_SHA1HMAC_LEGACY</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_OUTPUT_SIZE</string>
<key>AttributeValue</key>
<integer>20</integer>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_MAC</string>
<key>Description</key>
<string>SHA1HMAC MAC Legacy</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
<dict>
<key>AlgType</key>
<string>CSSM_ALGID_APPLE_YARROW</string>
<key>Attributes</key>
<array>
<dict>
<key>AttributeType</key>
<string>CSSM_ATTRIBUTE_NONE</string>
<key>AttributeValue</key>
<array/>
</dict>
</array>
<key>ContextType</key>
<string>CSSM_ALGCLASS_RANDOMGEN</string>
<key>Description</key>
<string>Yarrow PRNG</string>
<key>UseeTag</key>
<string>CSSM_USEE_NONE</string>
</dict>
</array>
</plist>
--- NEW FILE coolkey_csp_primary.mdsinfo ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>AclSubjectTypes</key>
<array>
<string>CSSM_ACL_SUBJECT_TYPE_PASSWORD</string>
<string>CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD</string>
<string>CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD</string>
</array>
<key>AuthTags</key>
<!-- @@@ complete this -->
<array>
<string>CSSM_ACL_AUTHORIZATION_ANY</string>
</array>
<key>CspCustomFlags</key>
<integer>0</integer>
<key>CspFlags</key>
<!-- @@@ dynamic -->
<string>CSSM_CSP_STORES_PRIVATE_KEYS | CSSM_CSP_STORES_PUBLIC_KEYS | CSSM_CSP_STORES_CERTIFICATES | CSSM_CSP_STORES_GENERIC</string>
<key>CspType</key>
<string>CSSM_CSP_HARDWARE</string>
<key>MdsFileDescription</key>
<string>Token CSPDL CSP Primary info</string>
<key>MdsFileType</key>
<string>PluginSpecific</string>
<key>MdsRecordType</key>
<string>MDS_CDSADIR_CSP_PRIMARY_RECORDTYPE</string>
<key>ModuleName</key>
<string>AppleSDCSPDL</string>
<key>ProductVersion</key>
<string>0.1</string>
<key>SampleTypes</key>
<array>
<string>CSSM_SAMPLE_TYPE_PASSWORD</string>
<string>CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD</string>
<string>CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD</string>
</array>
<key>UseeTags</key>
<array/>
<key>Vendor</key>
<string>Apple Computer, Inc.</string>
</dict>
</plist>
--- NEW FILE coolkey_dl_primary.mdsinfo ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>AclSubjectTypes</key>
<array>
<string>CSSM_ACL_SUBJECT_TYPE_PASSWORD</string>
<string>CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD</string>
<string>CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD</string>
</array>
<key>AuthTags</key>
<array>
<!-- @@@ complete this -->
<string>CSSM_ACL_AUTHORIZATION_ANY</string>
</array>
<key>ConjunctiveOps</key>
<array>
<string>CSSM_DB_NONE</string>
<string>CSSM_DB_AND</string>
<string>CSSM_DB_OR</string>
</array>
<key>DLType</key>
<string>CSSM_DL_FFS</string>
<key>MdsFileDescription</key>
<string>Token CSPDL DL Primary info</string>
<key>MdsFileType</key>
<string>PluginSpecific</string>
<key>MdsRecordType</key>
<string>MDS_CDSADIR_DL_PRIMARY_RECORDTYPE</string>
<key>ModuleName</key>
<string>AppleSDCSPDL</string>
<key>ProductVersion</key>
<string>0.1</string>
<key>QueryLimitsFlag</key>
<integer>0</integer>
<key>RelationalOps</key>
<array>
<string>CSSM_DB_EQUAL</string>
<string>CSSM_DB_LESS_THAN</string>
<string>CSSM_DB_GREATER_THAN</string>
<string>CSSM_DB_CONTAINS_FINAL_SUBSTRING</string>
<string>CSSM_DB_CONTAINS_INITIAL_SUBSTRING</string>
<string>CSSM_DB_CONTAINS</string>
<string></string>
</array>
<key>SampleTypes</key>
<array>
<string>CSSM_SAMPLE_TYPE_PASSWORD</string>
<string>CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD</string>
<string>CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD</string>
</array>
<key>Vendor</key>
<string>Apple Computer, Inc.</string>
</dict>
</plist>
--- NEW FILE coolkey_smartcard.mdsinfo ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>MdsFileDescription</key>
<string>SD/CSPDL Generic Smartcard Information</string>
<key>MdsRecordType</key>
<string>MDS_CDSADIR_CSP_SC_INFO_RECORDTYPE</string>
<key>MdsFileType</key>
<string>PluginSpecific</string>
<key>ScVendor</key>
<string>Generic</string>
<key>ScVersion</key>
<string>unknown</string>
<key>ScFirmwareVersion</key>
<string>unknown</string>
<key>ScFlags</key> <!-- @@@ dynamic -->
<integer>0</integer>
<key>ScCustomFlags</key>
<integer>0</integer>
</dict>
</plist>
14 years
esc/mac/Tokend-35209/CoolKey CoolKeyAttributeCoder.cpp, NONE, 1.1 CoolKeyAttributeCoder.h, NONE, 1.1 CoolKeyError.cpp, NONE, 1.1 CoolKeyError.h, NONE, 1.1 CoolKeyHandle.cpp, NONE, 1.1 CoolKeyHandle.h, NONE, 1.1 CoolKeyPK11.cpp, NONE, 1.1 CoolKeyPK11.h, NONE, 1.1 CoolKeyRecord.cpp, NONE, 1.1 CoolKeyRecord.h, NONE, 1.1 CoolKeySchema.cpp, NONE, 1.1 CoolKeySchema.h, NONE, 1.1 CoolKeyToken.cpp, NONE, 1.1 CoolKeyToken.h, NONE, 1.1 Info.plist, NONE, 1.1 coolkey.cpp, NONE, 1.1 dlfcn.h, NONE, 1.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/CoolKey
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16499/CoolKey
Added Files:
CoolKeyAttributeCoder.cpp CoolKeyAttributeCoder.h
CoolKeyError.cpp CoolKeyError.h CoolKeyHandle.cpp
CoolKeyHandle.h CoolKeyPK11.cpp CoolKeyPK11.h
CoolKeyRecord.cpp CoolKeyRecord.h CoolKeySchema.cpp
CoolKeySchema.h CoolKeyToken.cpp CoolKeyToken.h Info.plist
coolkey.cpp dlfcn.h
Log Message:
Add directory for Tokend-35209 for Leopard.
--- NEW FILE CoolKeyAttributeCoder.cpp ---
/*CoolKey
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyAttributeCoder.cpp
* Tokend CoolKey
*/
#include "CoolKeyAttributeCoder.h"
#include "Adornment.h"
#include "MetaAttribute.h"
#include "MetaRecord.h"
#include "Attribute.h"
#include <security_utilities/logging.h>
#include "CoolKeyRecord.h"
#include "CoolKeyToken.h"
#include "CoolKeyPK11.h"
#include <Security/cssmtype.h>
#include <Security/SecKeychainItem.h>
#include <security_cdsa_utilities/cssmkey.h>
#include <Security/SecCertificate.h>
#include <Security/SecKey.h>
using namespace Tokend;
//
// CoolKeyDataAttributeCoder
//
CoolKeyDataAttributeCoder::~CoolKeyDataAttributeCoder()
{
}
void CoolKeyDataAttributeCoder::decode(TokenContext *tokenContext,
const MetaAttribute &metaAttribute, Record &record)
{
Syslog::notice("CoolKeyDataAttributeCoder::decode");
}
CoolKeyCertAttributeCoder:: ~CoolKeyCertAttributeCoder()
{
}
void CoolKeyCertAttributeCoder::decode(Tokend::TokenContext *tokenContext,
const Tokend::MetaAttribute &metaAttribute, Tokend::Record &record)
{
uint32 id = metaAttribute.attributeId();
MetaAttribute::Format format = metaAttribute.attributeFormat();
CoolKeyToken *token = (CoolKeyToken *) tokenContext;
if(!token)
return;
CoolKeyRecord &coolRec = dynamic_cast<CoolKeyRecord &> (record);
CoolKeyCertObject *cert = (CoolKeyCertObject *) coolRec.getCoolKeyObject();
Syslog::notice("CertAttributeCoder::decode coder %p cert object %p id %lu format %lu record %p",this,cert,id,format,&record);
if(!cert)
return;
CK_BYTE tData[2048];
CK_ULONG dataLen = 2048;
CK_ULONG type = 0;
switch(id)
{
case kSecAlias:
Syslog::notice("kSecAlias");
cert->getLabel(tData,&dataLen);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((const void *)tData,dataLen));
break;
case kSecSubjectItemAttr:
cert->getSubject(tData,&dataLen);
Syslog::notice("kSecSubjectItemAttr retrieved data %p datalen %lu",tData,dataLen);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((const void *)tData,dataLen));
break;
case kSecIssuerItemAttr:
cert->getIssuer(tData,&dataLen);
Syslog::notice("kSecIssuertItemAttr retrieved data %p datalen %lu",tData,dataLen);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((const void *)tData,dataLen));
break;
case kSecSerialNumberItemAttr:
cert->getSerialNo(tData,&dataLen);
Syslog::notice("kSecSerialNumnberItemAttr retrieved data %p datalen %lu",tData,dataLen);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((const void *)tData,dataLen));
break;
case kSecPublicKeyHashItemAttr:
Syslog::notice("kSecPublicKeyHashItemAttr");
getCertAttributeFromData(cert,kSecPublicKeyHashItemAttr, tData, &dataLen);
record.attributeAtIndex(metaAttribute.attributeIndex(),
new Attribute((const void *)tData, dataLen));
break;
case kSecSubjectKeyIdentifierItemAttr:
Syslog::notice("kSecSubjectKeyIdentifierItemAttr");
break;
case kSecCertTypeItemAttr:
type = cert->getType();
Syslog::notice("kSecCertTypeItemAttr type %lu",type);
if(type == CKC_X_509)
type = CSSM_CERT_X_509v3;
else
if(type == CKC_X_509_ATTR_CERT)
type = CSSM_CERT_X_509_ATTRIBUTE;
else
type = CSSM_CERT_UNKNOWN;
Syslog::notice("kSecCertTypeItemAttr final type %lu",type);
record.attributeAtIndex(metaAttribute.attributeIndex(),new Attribute((uint32)type));
break;
case kSecCertEncodingItemAttr:
Syslog::notice("kSecCertEncodingItemAttr");
type = CSSM_CERT_ENCODING_BER;
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)type));
break;
case kSecLabelItemAttr:
cert->getLabel(tData,&dataLen);
Syslog::notice("kSecLabelItemAttr retrieved data %p datalen %lu",tData,dataLen);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((const void *)tData,dataLen));
break;
default:
Syslog::notice("missed one");
break;
};
}
void CoolKeyCertAttributeCoder::getCertAttributeFromData(CoolKeyCertObject *aCert,CK_ULONG aAttribute, CK_BYTE *aData, CK_ULONG *aDataLen)
{
CSSM_DATA csData;
CK_BYTE certData[2048];
CK_ULONG certDataLen = 2048;
OSStatus status = 0;
if(!aCert || !aData || *aDataLen <= 0)
return;
CK_ULONG size_in = *aDataLen;
*aDataLen = 0;
Syslog::notice("CoolKeyCertAttributeCoder::getCertAttributeFromData");
aCert->getData(certData,&certDataLen);
SecCertificateRef theCertificate;
csData.Data = certData;
csData.Length = certDataLen;
status = SecCertificateCreateFromData((CSSM_DATA * )&csData, CSSM_CERT_X_509v3,
CSSM_CERT_ENCODING_BER, &theCertificate);
if(status)
return;
Syslog::notice("CoolKeyCertAttributeCoder::getCertAttributeFromData done created cert");
SecKeychainAttribute ska = { kSecPublicKeyHashItemAttr };
SecKeychainItemRef tRef = (SecKeychainItemRef) theCertificate;
SecKeychainAttributeList skal = { 1, &ska };
status = SecKeychainItemCopyContent(tRef, NULL, &skal,
NULL, NULL);
Syslog::notice("CoolKeyCertAttributeCoder::getCertAttributeFromData done got attribute");
if(!status)
return;
if(ska.length < size_in)
{
memcpy(aData,ska.data,ska.length);
*aDataLen = ska.length;
}
SecKeychainItemFreeContent(&skal, NULL);
}
CoolKeyKeyAttributeCoder:: ~CoolKeyKeyAttributeCoder()
{
}
void CoolKeyKeyAttributeCoder::decode(Tokend::TokenContext *tokenContext,
const Tokend::MetaAttribute &metaAttribute, Tokend::Record &record)
{
Syslog::notice("CoolKeyKeyAttributeCoder::decode");
uint32 id = metaAttribute.attributeId();
MetaAttribute::Format format = metaAttribute.attributeFormat();
CoolKeyRecord &coolRec = dynamic_cast<CoolKeyRecord &> (record);
CoolKeyKeyObject *key = (CoolKeyKeyObject *) coolRec.getCoolKeyObject();
if(!key)
return;
CK_BYTE tData[2048];
CK_ULONG dataLen = 2048;
CK_ULONG value = 0;
CK_BYTE attrib = 0;
Syslog::notice("CoolKeyKeyAttributeCoder::decode coder %p id %d format %d record %p",this,id,format,&record);
switch(id)
{
case kSecKeyKeyClass:
Syslog::notice("kSecKeyKeyClass");
break;
case kSecKeyPrintName:
Syslog::notice("kSecKeyPrintName");
key->getLabel(tData,&dataLen);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((const void *)tData,dataLen));
break;
case kSecKeyAlias:
Syslog::notice("kSecKeyAlias");
break;
case kSecKeyPermanent:
Syslog::notice("kSecKeyPermanent");
break;
case kSecKeyPrivate:
Syslog::notice("kSecKeyKeyPrivate");
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)1));
break;
case kSecKeyModifiable:
Syslog::notice("kSecKeyKeyModifiable");
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)0));
break;
case kSecKeyApplicationTag:
Syslog::notice("kSecKeyApplicationTag");
break;
case kSecKeyKeyCreator:
Syslog::notice("kSecKeyKeyCreator");
break;
case kSecKeyKeyType:
Syslog::notice("kSecKeyType");
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)CSSM_ALGID_RSA));
break;
case kSecKeyKeySizeInBits:
Syslog::notice("kSecKeyKeySizeInBits");
value = key->getKeySize();
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)value));
Syslog::notice("kSecKeyKeySizeInBits %d",value);
break;
case kSecKeyEffectiveKeySize:
Syslog::notice("kSecKeyEffectiveKeySize");
value = key->getKeySize();;
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)value));
Syslog::notice("kSecKeyEffectiveKeySizeInBits %d",value);
break;
case kSecKeyStartDate:
Syslog::notice("kSecKeyKeyStartDate");
break;
case kSecKeyEndDate:
Syslog::notice("kSecKeyKeyEndDate");
break;
case kSecKeySensitive:
attrib = key->getSensitive();
Syslog::notice("kSecKeySensitive %d",attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyAlwaysSensitive:
attrib = key->getAlwaysSensitive();
Syslog::notice("kSecKeyAlwaysSensitive %d", attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyExtractable:
Syslog::notice("kSecKeyExtractable");
attrib = key->getKeyExtractable();
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyNeverExtractable:
Syslog::notice("kSecKeyNeverExtractable");
attrib = key->getKeyNeverExtractable();
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyEncrypt:
Syslog::notice("kSecKeyKeyEncrypt");
attrib = key->getKeyEncrypt();
Syslog::notice("kSecKeyEncrypt value %d",attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyDecrypt:
attrib = key->getKeyDecrypt();
Syslog::notice("kSecKeyDecrypt value %d",attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyDerive:
attrib = key->getKeyDerive();
Syslog::notice("kSecKeyKeyDerive %d", attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeySign:
attrib = key->getKeySign();
Syslog::notice("kSecKeyKeySign value %d",attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyVerify:
attrib = key->getKeyVerify();
Syslog::notice("kSecKeyKeyVerify value %d",attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeySignRecover:
attrib = key->getKeySignRecover();
Syslog::notice("kSecKeyKeySignRecover %d", attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyVerifyRecover:
attrib = key->getKeyVerifyRecover();
Syslog::notice("kSecKeyKeyVerifyRecover %d", attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyWrap:
attrib = key->getKeyWrap();
Syslog::notice("kSecKeyKeyWrap %d", attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyUnwrap:
attrib = key->getKeyUnwrap();
Syslog::notice("kSecKeyKeyUnwrap %d", attrib);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((uint32)attrib));
break;
case kSecKeyLabel:
Syslog::notice("kSecKeyLabel");
key->getLabel(tData,&dataLen);
record.attributeAtIndex(metaAttribute.attributeIndex(), new Attribute((const void *)tData,dataLen));
break;
};
}
/* arch-tag: 36510900-0DBC-11D9-9CFC-000A9595DEEE */
--- NEW FILE CoolKeyAttributeCoder.h ---
/*
* Copyright (c) 2004 Apple Computer, ICoolKeync. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyAttributeCoder.h
* Tokend CoolKey
*/
#ifndef _COOLKEY_ATTRIBUTECODER_H_
#define _COOLKEY_ATTRIBUTECODER_H_
#include "AttributeCoder.h"
#include <string>
#include <PCSC/musclecard.h>
#include "CoolKeyPK11.h"
//
// A coder that reads the data of an object
//
class CoolKeyDataAttributeCoder : public Tokend::AttributeCoder
{
NOCOPY(CoolKeyDataAttributeCoder)
public:
CoolKeyDataAttributeCoder() {}
virtual ~CoolKeyDataAttributeCoder();
virtual void decode(Tokend::TokenContext *tokenContext,
const Tokend::MetaAttribute &metaAttribute, Tokend::Record &record);
};
class CoolKeyCertAttributeCoder : public Tokend::AttributeCoder
{
NOCOPY(CoolKeyCertAttributeCoder)
public:
CoolKeyCertAttributeCoder() {}
virtual ~CoolKeyCertAttributeCoder();
virtual void decode(Tokend::TokenContext *tokenContext,
const Tokend::MetaAttribute &metaAttribute, Tokend::Record &record);
protected:
void getCertAttributeFromData(CoolKeyCertObject *aCert,CK_ULONG aAttribute, CK_BYTE *aData, CK_ULONG *aDataLen);
};
class CoolKeyKeyAttributeCoder : public Tokend::AttributeCoder
{
NOCOPY(CoolKeyKeyAttributeCoder)
public:
CoolKeyKeyAttributeCoder() {}
virtual ~CoolKeyKeyAttributeCoder();
virtual void decode(Tokend::TokenContext *tokenContext,
const Tokend::MetaAttribute &metaAttribute, Tokend::Record &record);
};
#endif /* !_CoolKeyATTRIBUTECODER_H_ */
/* arch-tag: 366E16D4-0DBC-11D9-B030-000A9595DEEE */
--- NEW FILE CoolKeyError.cpp ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyError.cpp
* TokendMuscle
*/
#include "CoolKeyError.h"
#include <Security/cssmerr.h>
//
// CoolKeyError exceptions
//
CoolKeyError::CoolKeyError(uint16_t sw) : SCardError(sw)
{
IFDEBUG(debugDiagnose(this));
}
const char *CoolKeyError::what() const throw ()
{ return "CoolKey Error"; }
OSStatus CoolKeyError::osStatus() const
{
switch (statusWord)
{
case COOLKEY_AUTHENTICATION_FAILED_0:
case COOLKEY_AUTHENTICATION_FAILED_1:
case COOLKEY_AUTHENTICATION_FAILED_2:
case COOLKEY_AUTHENTICATION_FAILED_3:
return CSSM_ERRCODE_OPERATION_AUTH_DENIED;
default:
return SCardError::osStatus();
}
}
void CoolKeyError::throwMe(uint16_t sw)
{ throw CoolKeyError(sw); }
#if !defined(NDEBUG)
void CoolKeyError::debugDiagnose(const void *id) const
{
secdebug("exception", "%p CoolKeyError %s (%04hX)",
id, errorstr(statusWord), statusWord);
}
const char *CoolKeyError::errorstr(uint16_t sw) const
{
switch (sw)
{
case COOLKEY_AUTHENTICATION_FAILED_0:
return "Authentication failed, 0 retries left.";
case COOLKEY_AUTHENTICATION_FAILED_1:
return "Authentication failed, 1 retry left.";
case COOLKEY_AUTHENTICATION_FAILED_2:
return "Authentication failed, 2 retries left.";
case COOLKEY_AUTHENTICATION_FAILED_3:
return "Authentication failed, 3 retries left.";
default:
return SCardError::errorstr(sw);
}
}
#endif //NDEBUG
/* arch-tag: 0D984528-10D9-11D9-84A3-000393D5F80A */
--- NEW FILE CoolKeyError.h ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyError.h
* TokendMuscle
*/
#ifndef _COOLKEY_ERROR_H_
#define _COOLKEY_ERROR_H_
/** Entered PIN is not correct and pin was blocked. */
#define COOLKEY_AUTHENTICATION_FAILED_0 0x6300
/** Entered PIN is not correct, 1 try left. */
#define COOLKEY_AUTHENTICATION_FAILED_1 0x6301
/** Entered PIN is not correct, 2 tries left. */
#define COOLKEY_AUTHENTICATION_FAILED_2 0x6302
/** Entered PIN is not correct, 3 tries left. */
#define COOLKEY_AUTHENTICATION_FAILED_3 0x6303
#include "SCardError.h"
class CoolKeyError : public Tokend::SCardError
{
protected:
CoolKeyError(uint16_t sw);
public:
OSStatus osStatus() const;
virtual const char *what () const throw ();
static void check(uint16_t sw) { if (sw != SCARD_SUCCESS) throwMe(sw); }
static void throwMe(uint16_t sw) __attribute__((noreturn));
protected:
IFDEBUG(void debugDiagnose(const void *id) const;)
IFDEBUG(const char *errorstr(uint16_t sw) const;)
};
#endif /* !_CoolKeyERROR_H_ */
/* arch-tag: 0EB9B81B-10D9-11D9-BA83-000393D5F80A */
--- NEW FILE CoolKeyHandle.cpp ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyKeyHandle.cpp
* Tokend CoolKey
*/
#include "CoolKeyHandle.h"
#include "CoolKeyRecord.h"
#include "CoolKeyToken.h"
#include <security_utilities/debugging.h>
#include <security_utilities/utilities.h>
#include <security_cdsa_utilities/cssmerrors.h>
#include <security_cdsa_client/aclclient.h>
#include <Security/cssmerr.h>
#include <security_utilities/logging.h>
static const unsigned char sha1sigheader[] =
{
0x30, // SEQUENCE
0x21, // LENGTH
0x30, // SEQUENCE
0x09, // LENGTH
0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1a, // SHA1 OID (1 4 14 3 2 26)
0x05, 0x00, // OPTIONAL ANY algorithm params (NULL)
0x04, 0x14 // OCTECT STRING (20 bytes)
};
static const unsigned char md5sigheader[] =
{
0x30, // SEQUENCE
0x20, // LENGTH
0x30, // SEQUENCE
0x0C, // LENGTH
// MD5 OID (1 2 840 113549 2 5)
0x06, 0x08, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05,
0x05, 0x00, // OPTIONAL ANY algorithm params (NULL)
0x04, 0x10 // OCTECT STRING (16 bytes)
};
using CssmClient::AclFactory;
//
// CoolKeyKeyHandle
//
CoolKeyKeyHandle::CoolKeyKeyHandle(CoolKeyToken &coolToken,
const Tokend::MetaRecord &metaRecord, CoolKeyRecord &coolKey) :
Tokend::KeyHandle(metaRecord, &coolKey),
mToken(coolToken),mRecord(coolKey)
{
}
CoolKeyKeyHandle::~CoolKeyKeyHandle()
{
}
void CoolKeyKeyHandle::getKeySize(CSSM_KEY_SIZE &keySize)
{
Syslog::notice("CoolKeyHandle::getKeySize");
CssmError::throwMe(CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED);
}
uint32 CoolKeyKeyHandle::getOutputSize(const Context &context, uint32 inputSize,
bool encrypting)
{
Syslog::notice("CoolKeyHandle::getOutputSize");
CssmError::throwMe(CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED);
return 0;
}
void CoolKeyKeyHandle::generateSignature(const Context &context,
CSSM_ALGORITHMS signOnly, const CssmData &input, CssmData &signature)
{
Syslog::notice("CoolKeyHandle::generateSignature Input length %d context.type %d context.alg %d",input.length(),context.type(),context.algorithm());
CoolKeyObject * coolObj = mRecord.getCoolKeyObject();
if(!coolObj || coolObj->getClass() != CKO_PRIVATE_KEY)
{
Syslog::notice("Can't find object for record %p or incorrect object type", &mRecord);
CssmError::throwMe(CSSM_ERRCODE_INVALID_DATA);
}
CoolKeyKeyObject * keyObj = (CoolKeyKeyObject *) coolObj;
CK_ULONG keyLength = keyObj->getKeySize() / 8;
Syslog::notice("keyLength %d",keyLength);
if (context.type() != CSSM_ALGCLASS_SIGNATURE)
CssmError::throwMe(CSSMERR_CSP_INVALID_CONTEXT);
if (context.algorithm() != CSSM_ALGID_RSA)
CssmError::throwMe(CSSMERR_CSP_INVALID_ALGORITHM);
// Find out if we are doing a SHA1 or MD5 signature and setup header to
// point to the right asn1 blob.
const unsigned char *header = NULL;
size_t headerLength = 0;
if (signOnly == CSSM_ALGID_SHA1)
{
Syslog::notice("Asking for SHA1");
header = sha1sigheader;
headerLength = sizeof(sha1sigheader);
Syslog::notice("header is sha1sigheader, len %d", headerLength);
if (input.Length != 20)
CssmError::throwMe(CSSMERR_CSP_BLOCK_SIZE_MISMATCH);
}
else if (signOnly == CSSM_ALGID_MD5)
{
Syslog::notice("Asking for MD5");
header = md5sigheader;
headerLength = sizeof(md5sigheader);
Syslog::notice("header is md5sigheader, len %d", headerLength);
if (input.Length != 16)
CssmError::throwMe(CSSMERR_CSP_BLOCK_SIZE_MISMATCH);
}
else if (signOnly == CSSM_ALGID_NONE)
{
header = NULL;
headerLength = 0;
Syslog::notice("Asking for CSSM_ALGID_NONE");
// Special case used by SSL it's an RSA signature, without the ASN1 stuff
}
else
CssmError::throwMe(CSSMERR_CSP_INVALID_DIGEST_ALGORITHM);
CoolKeyPK11 pk11Manager = mToken.getPK11Manager();
int loggedIn = pk11Manager.isTokenLoggedIn();
if(!loggedIn)
{
Syslog::error("Can't sign , not logged in.");
CssmError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED);
}
signature.Data =( uint8*) malloc(keyLength);
// Create an input buffer in which we construct the data we will send to
// the token.
size_t inputDataSize = headerLength + input.Length;
Syslog::notice("inputDataSize %d", inputDataSize);
auto_array<unsigned char> inputData(keyLength);
unsigned char *to = inputData.get();
// Get padding, but default to pkcs1 style padding
uint32 padding = CSSM_PADDING_NONE;
context.getInt(CSSM_ATTRIBUTE_PADDING, padding);
Syslog::notice("padding value %d",padding);
if (padding == CSSM_PADDING_PKCS1)
{
Syslog::notice("CSSM_PADDING_PKCS1.");
// Add PKCS1 style padding
*(to++) = 0;
*(to++) = 1; /* Private Key Block Type. */
size_t padLength = keyLength - 3 - inputDataSize;
Syslog::notice("padlength %d",padLength);
memset(to, 0xff, padLength);
to += padLength;
*(to++) = 0;
inputDataSize = keyLength;
}
else if (padding == CSSM_PADDING_NONE)
{
Syslog::notice("CSSM_PADDING_NONE");
// Token will fail if the input data isn't exactly keysize / 8 octects
// long
}
else
CssmError::throwMe(CSSMERR_CSP_INVALID_ATTR_PADDING);
if (headerLength)
{
memcpy(to, header, headerLength);
to += headerLength;
}
// Finally copy the passed in data to the input buffer.
memcpy(to, input.Data, input.Length);
if(!signature.Data)
{
Syslog::error("Can't allocate memory for signature operation.");
CssmError::throwMe(CSSM_ERRCODE_INVALID_DATA);
}
signature.Length = (size_t) keyLength;
int result = pk11Manager.generateSignature(coolObj,inputData.get(),inputDataSize,signature.Data,&signature.Length);
if(!result)
{
Syslog::notice("Problem generating signature");
if(signature.Data)
free(signature.Data);
CssmError::throwMe(CSSMERR_CSP_FUNCTION_FAILED);
}
Syslog::notice("generateSignature returned %d data lenght %d", result, signature.Length);
}
void CoolKeyKeyHandle::verifySignature(const Context &context,
CSSM_ALGORITHMS signOnly, const CssmData &input, const CssmData &signature)
{
Syslog::notice("CoolKeyHandle::verifySignature");
CssmError::throwMe(CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED);
}
void CoolKeyKeyHandle::generateMac(const Context &context,
const CssmData &input, CssmData &output)
{
Syslog::notice("CoolKeyHandle::generateMac");
CssmError::throwMe(CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED);
}
void CoolKeyKeyHandle::verifyMac(const Context &context,
const CssmData &input, const CssmData &compare)
{
Syslog::notice("CoolKeyHandle::verifyMac");
CssmError::throwMe(CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED);
}
void CoolKeyKeyHandle::encrypt(const Context &context,
const CssmData &clear, CssmData &cipher)
{
Syslog::notice("CoolKeyHandle::encrypt");
CssmError::throwMe(CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED);
}
void CoolKeyKeyHandle::decrypt(const Context &context,
const CssmData &cipher, CssmData &clear)
{
Syslog::notice("CoolKeyHandle::decrypt type %d alg %d length %d",context.type(), context.algorithm(),cipher.length());
CoolKeyObject * coolObj = mRecord.getCoolKeyObject();
if(!coolObj || coolObj->getClass() != CKO_PRIVATE_KEY )
{
Syslog::notice("Can't find object for record or incorrect object %p", &mRecord);
CssmError::throwMe(CSSM_ERRCODE_INVALID_DATA);
}
CoolKeyKeyObject * keyObj = (CoolKeyKeyObject *) coolObj;
CK_ULONG keyLength = keyObj->getKeySize() / 8;
Syslog::notice("keyLength %d",keyLength);
if (context.type() != CSSM_ALGCLASS_ASYMMETRIC)
{
Syslog::error("In decrypt wrong key type, not asymmetric");
CssmError::throwMe(CSSMERR_CSP_INVALID_CONTEXT);
}
if (context.algorithm() != CSSM_ALGID_RSA)
{
Syslog::error("In decrypt wrong algorithm, not RSA");
CssmError::throwMe(CSSMERR_CSP_INVALID_ALGORITHM);
}
CoolKeyPK11 pk11Manager = mToken.getPK11Manager();
int loggedIn = pk11Manager.isTokenLoggedIn();
if(!loggedIn)
{
Syslog::error("Can't decrypt , not logged in.");
CssmError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED);
}
clear.Data = (uint8 *) malloc((size_t) keyLength);
clear.Length = keyLength;
if(!clear.Data)
{
Syslog::error("Can't allocate data for decrype operation.");
CssmError::throwMe(CSSM_ERRCODE_INVALID_DATA);
}
int result = pk11Manager.decryptData(coolObj,cipher.Data,cipher.Length,clear.Data,&clear.Length);
if(!result)
{
Syslog::error("Problem with decrypt operation");
if(clear.Data)
{
free(clear.Data);
}
CssmError::throwMe(CSSMERR_CSP_FUNCTION_FAILED);
}
Syslog::notice("decryptData returned %d data lenght %d", result, clear.Length);
}
void CoolKeyKeyHandle::exportKey(const Context &context,
const AccessCredentials *cred, CssmKey &wrappedKey)
{
Syslog::notice("CoolKeyHandle::exportKey");
CssmError::throwMe(CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED);
}
void CoolKeyKeyHandle::getOwner(AclOwnerPrototype &owner)
{
Syslog::notice("CoolKeyKeyHandle::getOwner");
if (!mAclOwner) {
Allocator &alloc = Allocator::standard();
mAclOwner.allocator(alloc);
mAclOwner = AclFactory::AnySubject(alloc);
}
owner = mAclOwner;
}
void CoolKeyKeyHandle::getAcl(const char *tag, uint32 &count, AclEntryInfo *&aclList)
{
Syslog::notice("CoolKeyKeyHandle::getAcl tag %s",tag);
// we don't (yet) support queries by tag
if (tag)
CssmError::throwMe(CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG);
if(!mAclEntries) {
mAclEntries.allocator(Allocator::standard());
// Anyone can read the DB record for this key (which is a reference
// CSSM_KEY)
mAclEntries.add(CssmClient::AclFactory::AnySubject(
mAclEntries.allocator()),
AclAuthorizationSet(CSSM_ACL_AUTHORIZATION_DB_READ, 0));
CssmData prompt;
CoolKeyPK11 pk11Manager = mToken.getPK11Manager();
int loggedIn = pk11Manager.isTokenLoggedIn();
if(!loggedIn)
{
Syslog::notice("CoolKeyKeyHandle:getAcl token NOT logged in already");
mAclEntries.add(CssmClient::AclFactory::PromptPWSubject(
mAclEntries.allocator(), prompt),
AclAuthorizationSet(
CSSM_ACL_AUTHORIZATION_SIGN
, CSSM_ACL_AUTHORIZATION_DECRYPT,CSSM_ACL_AUTHORIZATION_ENCRYPT, 0));
}
else
{
Syslog::notice("CoolKeyKeyHandle:getAcl token logged in already");
mAclEntries.add(CssmClient::AclFactory::AnySubject(
mAclEntries.allocator()),
AclAuthorizationSet(
CSSM_ACL_AUTHORIZATION_SIGN
, CSSM_ACL_AUTHORIZATION_DECRYPT,CSSM_ACL_AUTHORIZATION_ENCRYPT, 0));
}
}
count = mAclEntries.size();
aclList = mAclEntries.entries();
}
//
// CoolKeyKeyHandleFactory
//
CoolKeyKeyHandleFactory::~CoolKeyKeyHandleFactory()
{
}
Tokend::KeyHandle *CoolKeyKeyHandleFactory::keyHandle(
Tokend::TokenContext *tokenContext, const Tokend::MetaRecord &metaRecord,
Tokend::Record &record) const
{
Syslog::notice("CoolKeyKeyHandleFactory::keyHandle record %p ",&record);
CoolKeyToken &theToken = static_cast<CoolKeyToken& >(*tokenContext);
CoolKeyRecord &keyRecord = dynamic_cast<CoolKeyRecord &>(record);
return new CoolKeyKeyHandle(theToken, metaRecord, keyRecord);
}
/* arch-tag: 3685A262-0DBC-11D9-BC66-000A9595DEEE */
--- NEW FILE CoolKeyHandle.h ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyKeyHandle.h
* Tokend CoolKey
*/
#ifndef _COOLKEY_KEYHANDLE_H_
#define _COOLKEY_KEYHANDLE_H_
#include "KeyHandle.h"
class CoolKeyToken;
class CoolKeyRecord;
//
// A KeyHandle object which implements the crypto interface to muscle.
//
class CoolKeyKeyHandle: public Tokend::KeyHandle
{
NOCOPY(CoolKeyKeyHandle)
public:
CoolKeyKeyHandle(CoolKeyToken &cacToken, const Tokend::MetaRecord &metaRecord,
CoolKeyRecord &cacKey);
~CoolKeyKeyHandle();
virtual void getKeySize(CSSM_KEY_SIZE &keySize);
virtual uint32 getOutputSize(const Context &context, uint32 inputSize,
bool encrypting);
virtual void generateSignature(const Context &context,
CSSM_ALGORITHMS signOnly, const CssmData &input, CssmData &signature);
virtual void verifySignature(const Context &context,
CSSM_ALGORITHMS signOnly, const CssmData &input,
const CssmData &signature);
virtual void generateMac(const Context &context, const CssmData &input,
CssmData &output);
virtual void verifyMac(const Context &context, const CssmData &input,
const CssmData &compare);
virtual void encrypt(const Context &context, const CssmData &clear,
CssmData &cipher);
virtual void decrypt(const Context &context, const CssmData &cipher,
CssmData &clear);
virtual void exportKey(const Context &context,
const AccessCredentials *cred, CssmKey &wrappedKey);
virtual void getOwner(AclOwnerPrototype &owner);
virtual void getAcl(const char *tag, uint32 &count, AclEntryInfo *&aclList);
private:
AutoAclOwnerPrototype mAclOwner;
AutoAclEntryInfoList mAclEntries;
CoolKeyToken &mToken;
CoolKeyRecord &mRecord;
};
//
// A factory that creates CoolKeyKeyHandle objects.
//
class CoolKeyKeyHandleFactory : public Tokend::KeyHandleFactory
{
NOCOPY(CoolKeyKeyHandleFactory)
public:
CoolKeyKeyHandleFactory() {}
virtual ~CoolKeyKeyHandleFactory();
virtual Tokend::KeyHandle *keyHandle(Tokend::TokenContext *tokenContext,
const Tokend::MetaRecord &metaRecord, Tokend::Record &record) const;
};
#endif /* !_CoolKeyKEYHANDLE_H_ */
/* arch-tag: 36A35766-0DBC-11D9-BB4D-000A9595DEEE */
--- NEW FILE CoolKeyPK11.cpp ---
/*
* CoolKeyPK11.cpp - CoolKey.tokend PKCS11 helper class
*/
#include "CoolKeyPK11.h"
#include <security_utilities/logging.h>
#include <dlfcn.h>
CK_ATTRIBUTE obj_classTemplate[] = {
{CKA_CLASS,NULL,0}
};
CK_ATTRIBUTE certTemplate[] = {
{CKA_CERTIFICATE_TYPE,NULL,0},{CKA_LABEL,NULL,0},
{CKA_SUBJECT,NULL,0},{CKA_ID,NULL,0},{CKA_ISSUER,NULL,0},
{CKA_SERIAL_NUMBER,NULL,0}, {CKA_VALUE,NULL,0}
};
CK_ATTRIBUTE public_keyTemplate[] = {
{CKA_KEY_TYPE,NULL,0},{CKA_ID,NULL,0},{CKA_LABEL,NULL,0},{CKA_MODULUS,NULL,0},
{CKA_PUBLIC_EXPONENT,NULL,0},{CKA_START_DATE,NULL,0},
{CKA_END_DATE,NULL,0},
{CKA_ENCRYPT,NULL,0},{CKA_VERIFY,NULL,0},{CKA_VERIFY_RECOVER,NULL,0},
{CKA_WRAP,NULL,0}
};
CK_ATTRIBUTE private_keyTemplate[] = {
{CKA_KEY_TYPE,NULL,0},{CKA_ID,NULL,0},{CKA_MODULUS,NULL,0},
{CKA_LABEL,NULL,0},{CKA_START_DATE,NULL,0},
{CKA_END_DATE,NULL,0}, {CKA_SENSITIVE,NULL,0},
{CKA_DECRYPT,NULL,0}, {CKA_SIGN,NULL,0}, {CKA_SIGN_RECOVER,NULL,0},
{CKA_UNWRAP,NULL,0}, {CKA_EXTRACTABLE,NULL,0}, {CKA_ALWAYS_SENSITIVE,NULL,0},
{CKA_NEVER_EXTRACTABLE,NULL,0},
{CKA_UNWRAP_TEMPLATE,NULL,0},{CKA_ALWAYS_AUTHENTICATE}
};
CK_ATTRIBUTE secret_keyTemplate[] = {
{CKA_KEY_TYPE,NULL,0},{CKA_ID,NULL,0},{CKA_LABEL,NULL,0},
{CKA_SENSITIVE,NULL,0},{CKA_ENCRYPT,NULL,0},{CKA_DECRYPT,NULL,0},
{CKA_SIGN,NULL,0},{CKA_VERIFY,NULL,0},{CKA_WRAP,NULL,0},{CKA_UNWRAP,NULL,0},
{CKA_EXTRACTABLE,NULL,0},{CKA_ALWAYS_SENSITIVE,NULL,0},{CKA_NEVER_EXTRACTABLE,NULL,0},
{CKA_CHECK_VALUE,NULL,0},{CKA_WRAP_WITH_TRUSTED,NULL,0},{CKA_TRUSTED,NULL,0},
{CKA_WRAP_TEMPLATE,NULL,0}
};
int CoolKeyPK11::loginToken(char *aPIN)
{
if(!mInitialized)
return 0;
if(!aPIN)
return 0;
CK_RV ck_rv = mEpv->C_Login(mSessHandle,CKU_USER,(CK_UTF8CHAR_PTR ) aPIN,(CK_ULONG) strlen(aPIN));
Syslog::notice("CoolKeyPK11::loginToken result %d aPin %s ",ck_rv,"****");
if(ck_rv == CKR_OK && !mCachedPIN.size())
{
//Syslog::notice("CoolKeyPK11::loginToken setting cached PIN");
mCachedPIN = aPIN;
}
return ck_rv;
}
void CoolKeyPK11::logoutToken()
{
if(!mInitialized)
return;
CK_RV ck_rv = mEpv->C_Logout(mSessHandle);
//clear cached pin
mCachedPIN = "";
Syslog::notice("CoolKeyPK11::logout result %d ",ck_rv);
}
int CoolKeyPK11::verifyCachedPIN(char *aPIN)
{
if(!aPIN || !mInitialized)
return CKR_PIN_INCORRECT;
if(!strcmp(aPIN,(char *) mCachedPIN.c_str()))
{
Syslog::notice("PIN OK!");
return CKR_OK;
}
Syslog::notice("PIN not OK!");
return CKR_PIN_INCORRECT;
}
int CoolKeyPK11::isTokenLoggedIn()
{
CK_RV ck_rv;
if(!mInitialized)
return 0;
CK_SESSION_INFO sinfo;
CK_SESSION_HANDLE h = (CK_SESSION_HANDLE)0;
ck_rv = mEpv->C_GetSessionInfo(mSessHandle, &sinfo);
if( CKR_OK != ck_rv ) {
Syslog::notice("isTokenLoggedIn C_GetSessionInfo(0x%08x) returned %lu ulDeviceError %lu", mSessHandle, ck_rv,sinfo.ulDeviceError);
ck_rv = mEpv->C_OpenSession(mSlots[mOurSlotIndex], CKF_SERIAL_SESSION, (CK_VOID_PTR)CK_NULL_PTR, (CK_NOTIFY)CK_NULL_PTR, &h);
if( CKR_OK != ck_rv ) {
Syslog::error("C_OpenSession(%lu, CKF_SERIAL_SESSION, , ) returned 0x%08x", mSlots[mOurSlotIndex], ck_rv);
return 0;
}
ck_rv = mEpv->C_GetSessionInfo(h, &sinfo);
if( CKR_OK != ck_rv) {
Syslog::error("Failed second chance to get session info!!");
return 0;
}
else
{
Syslog::notice("Created new session handle, old one is invalid! 0x%08x ",h);
mSessHandle = h;
}
}
int loggedIn = 0;
Syslog::notice("isTokenLoggedIn token state %d", sinfo.state);
if(sinfo.state == CKS_RO_USER_FUNCTIONS || sinfo.state == CKS_RW_USER_FUNCTIONS)
{
Syslog::notice("isTokenLoggedIn Token IS logged in");
loggedIn = 1;
}
else
{
Syslog::notice("isTokenLoggedIn Token IS NOT logged in");
}
return loggedIn;
}
int CoolKeyPK11::loadModule()
{
CK_RV ck_rv;
CK_FUNCTION_LIST_PTR epv = (CK_FUNCTION_LIST_PTR) NULL;
CK_C_GetFunctionList gfl;
CK_C_INITIALIZE_ARGS InitArgs;
InitArgs.CreateMutex=0; //CK_CREATEMUTEX
InitArgs.DestroyMutex=0; //CK_DESTROYMUTEX
InitArgs.LockMutex=0; //CK_LOCKMUTEX
InitArgs.UnlockMutex=0; //CK_UNLOCKMUTEX
InitArgs.flags=0; //CK_FLAGS
InitArgs.pReserved=0; //CK_C_INITIALIZE_ARGS
mTokenUid[0] = 0;
mPk11Driver = dlopen(PKCS11_PATH_NAME,RTLD_LAZY);
if(!mPk11Driver)
{
Syslog::error("Can't load pkcs11 driver error: %d ",dlerror());
return 0;
}
else
{
Syslog::debug("In CoolKeyToken::loadPKCS11() . past load lib %p ",mPk11Driver);
}
// Now try to load the functions
gfl =(CK_C_GetFunctionList) dlsym(mPk11Driver,"C_GetFunctionList");
if(gfl == NULL)
{
Syslog::error("In CoolKeyToken::loadPKCS11() Can't load symbol C_GetFunctionList error: $d ",dlerror());
dlclose(mPk11Driver);
mPk11Driver = NULL;
return 0;
}
//Syslog::debug("Found C_GetFunctionList : %p " , gfl);
ck_rv = (*gfl)(&epv);
if(ck_rv != CKR_OK)
{
Syslog::error("Can't get actual function list ");
dlclose(mPk11Driver);
mPk11Driver = NULL;
return 0;
}
//Syslog::debug("Function list found %p ", epv);
mEpv = epv;
//Now try to actually initialize the module
ck_rv = mEpv->C_Initialize(&InitArgs);
if(ck_rv != CKR_OK)
{
Syslog::error("Error initializing PKCS11 module result: %d ",ck_rv);
dlclose(mPk11Driver);
mPk11Driver = NULL;
mEpv = NULL;
return 0;
}
//Syslog::debug("Successfully Initialized PKCS11 module. ");
mInitialized = 1;
int res = loadSlotList();
if(res)
{
mIsOurToken = 1;
}
else
mInitialized = 0;
return res;
}
int CoolKeyPK11::freeModule()
{
if(!mInitialized)
{
return 1;
}
if(mEpv)
{
mEpv->C_Finalize(NULL);
mInitialized = NULL;
}
return 1;
}
int CoolKeyPK11::freeObjects()
{
return 1;
}
int CoolKeyPK11::loadObjects()
{
CK_RV ck_rv;
if(!mInitialized)
return 0;
CK_SESSION_HANDLE h = (CK_SESSION_HANDLE)0;
CK_SESSION_INFO sinfo;
CK_ULONG tnObjects = 0;
mSessHandle = 0;
ck_rv = mEpv->C_OpenSession(mSlots[mOurSlotIndex], CKF_SERIAL_SESSION, (CK_VOID_PTR)CK_NULL_PTR, (CK_NOTIFY)CK_NULL_PTR, &h);
if( CKR_OK != ck_rv ) {
Syslog::error("C_OpenSession(%lu, CKF_SERIAL_SESSION, , ) returned 0x%08x", mSlots[mOurSlotIndex], ck_rv);
return 0;
}
Syslog::notice(" Opened a session: handle = 0x%08x", h);
mSessHandle = h;
ck_rv = mEpv->C_GetSessionInfo(h, &sinfo);
if( CKR_OK != ck_rv ) {
Syslog::notice("C_GetSessionInfo(%lu, ) returned 0x%08x", h, ck_rv);
return 0;
}
Syslog::notice(" SESSION INFO:");
Syslog::notice(" slotID = %lu", sinfo.slotID);
Syslog::notice(" state = %lu", sinfo.state);
Syslog::notice(" flags = 0x%08x", sinfo.flags);
Syslog::notice(" ulDeviceError = %lu", sinfo.ulDeviceError);
ck_rv = mEpv->C_FindObjectsInit(h, (CK_ATTRIBUTE_PTR)CK_NULL_PTR, 0);
if( CKR_OK != ck_rv ) {
Syslog::error("C_FindObjectsInit(%lu, NULL_PTR, 0) returned 0x%08x", h, ck_rv);
return 0;
}
Syslog::notice(" All objects:");
while(1) {
CK_OBJECT_HANDLE o = (CK_OBJECT_HANDLE)0;
CK_ULONG nObjects = 0;
ck_rv = mEpv->C_FindObjects(h, &o, 1, &nObjects);
if( CKR_OK != ck_rv ) {
Syslog::notice("C_FindObjects(%lu, , 1, ) returned 0x%08x", h, ck_rv);
return 0;
}
if( 0 == nObjects ) {
break;
}
tnObjects++;
Syslog::notice(" OBJECT HANDLE %lu", o);
ck_rv = mEpv->C_GetAttributeValue(h, o, obj_classTemplate, 1);
//Syslog::notice("ck_rv %d",ck_rv);
switch( ck_rv ) {
case CKR_OK:
case CKR_ATTRIBUTE_SENSITIVE:
case CKR_ATTRIBUTE_TYPE_INVALID:
case CKR_BUFFER_TOO_SMALL:
break;
default:
Syslog::notice("C_GetAtributeValue(%lu, %lu, {one attribute type}, %lu) returned 0x%08x",
h, o, 1, ck_rv);
return 0;
}
if( 1 ) {
if( -1 != (CK_LONG)obj_classTemplate[0].ulValueLen ) {
obj_classTemplate[0].pValue = (CK_VOID_PTR) new char[obj_classTemplate[0].ulValueLen];
if(!obj_classTemplate[0].pValue)
{
Syslog::notice("Can't allocate memory for attribute of size %d",(int) obj_classTemplate[0].ulValueLen);
continue;
}
ck_rv = mEpv->C_GetAttributeValue(h, o, obj_classTemplate, 1);
if(ck_rv == CKR_OK)
{
CK_LONG obj_class = (CK_LONG) *((CK_LONG *) obj_classTemplate[0].pValue);
Syslog::notice("objclass: %lu",obj_class);
CoolKeyObject *newObject = NULL;
switch(obj_class)
{
case CKO_CERTIFICATE:
Syslog::notice("Found certificate:-----------------");
newObject = (CoolKeyObject *) new CoolKeyCertObject(o,h,obj_class,this);
break;
case CKO_PUBLIC_KEY:
Syslog::notice("Found public key:----------------");
newObject = (CoolKeyObject *) new CoolKeyKeyObject(o,h,obj_class,this);
Syslog::notice("Found public key:");
break;
case CKO_PRIVATE_KEY:
Syslog::notice("Found private key:-------------------");
newObject = (CoolKeyObject *) new CoolKeyKeyObject(o,h,obj_class,this);
break;
default:
Syslog::notice("Found something else:");
break;
};
if(newObject)
{
mObjects[o] = newObject;
}
}
if(obj_classTemplate[0].pValue)
delete [] (char *) obj_classTemplate[0].pValue;
obj_classTemplate[0].pValue = NULL;
}
}
} /* while(1) */
ck_rv = mEpv->C_FindObjectsFinal(h);
if( CKR_OK != ck_rv ) {
Syslog::notice("C_FindObjectsFinal(%lu) returned 0x%08x", h, ck_rv);
return 0;
}
Syslog::notice(" (%lu objects total)", tnObjects);
ck_rv = mEpv->C_CloseSession(h);
if( CKR_OK != ck_rv ) {
Syslog::notice( "C_CloseSession(%lu) returned 0x%08x", h, ck_rv);
return 0;
}
return 1;
}
int CoolKeyPK11::loadSlotList()
{
mTokenUid[0] = 0;
int result = 0;
if(!mInitialized)
{
return result;
}
CK_RV ck_rv = 0;
CK_ULONG nSlots = 0;
ck_rv = mEpv->C_GetSlotList(CK_FALSE,(CK_SLOT_ID) CK_NULL_PTR,&nSlots);
if(ck_rv == CKR_OK)
{
Syslog::notice("In CoolKeyPK11:loadSlotList() GetSlotList found %d slot(s) ",nSlots);
}
else
{
Syslog::notice("In CoolKeyToken::probe() GetSlotList error: %d ",ck_rv);
}
if(nSlots > COOLKEY_MAX_SLOTS)
{
return result;
}
if(nSlots > 0)
{
ck_rv = mEpv->C_GetSlotList(CK_FALSE,mSlots, &nSlots);
if(ck_rv != CKR_OK)
{
Syslog::debug("In CoolKeyToken::probe() GetSlotList error: %d ",ck_rv);
}
mOurSlotIndex = nSlots - 1;
for(CK_ULONG i = 0; i < nSlots ; i++)
{
CK_SLOT_INFO sinfo;
int j = 0;
while( j++ < 5)
{
ck_rv = mEpv->C_GetSlotInfo(mSlots[i],&sinfo);
if(ck_rv != CKR_OK)
{
Syslog::error("In CoolKeyPK11::loadSlotListe() GetSlotInfo error: %d ",ck_rv);
break;
//continue;
}
Syslog::notice(" Slot Info: Slot: %d" ,i);
Syslog::notice(" slotDescription = \"%.64s\"", sinfo.slotDescription);
Syslog::notice(" manufacturerID = \"%.32s\"", sinfo.manufacturerID);
Syslog::notice(" flags = 0x%08lx", sinfo.flags);
Syslog::notice(" -> TOKEN PRESENT = %s",
sinfo.flags & CKF_TOKEN_PRESENT ? "TRUE" : "FALSE");
Syslog::notice(" -> REMOVABLE DEVICE = %s",
sinfo.flags & CKF_REMOVABLE_DEVICE ? "TRUE" : "FALSE");
Syslog::notice(" -> HW SLOT = %s",
sinfo.flags & CKF_HW_SLOT ? "TRUE" : "FALSE");
Syslog::notice(" hardwareVersion = %lu.%02lu",
sinfo.hardwareVersion.major, sinfo.hardwareVersion.minor);
Syslog::notice(" firmwareVersion = %lu.%02lu",
sinfo.firmwareVersion.major, sinfo.firmwareVersion.minor);
Syslog::notice(" See if token is present in reader");
if(!(sinfo.flags & CKF_TOKEN_PRESENT))
{
Syslog::notice(" Failed to connect to the token try again.");
usleep(100000);
continue;
}
Syslog::notice(" Token is really present!");
break;
}
if(sinfo.flags & CKF_TOKEN_PRESENT )
{
CK_TOKEN_INFO tinfo;
(void)memset(&tinfo, 0, sizeof(CK_TOKEN_INFO));
ck_rv = mEpv->C_GetTokenInfo(mSlots[i], &tinfo);
if( CKR_OK != ck_rv ) {
Syslog::debug("C_GetTokenInfo(%lu, ) returned 0x%08x", mSlots[i], ck_rv);
return result;
}
Syslog::notice(" Token Info:");
Syslog::notice(" label = \"%.32s\"", tinfo.label);
Syslog::notice(" manufacturerID = \"%.32s\"", tinfo.manufacturerID);
Syslog::notice(" model = \"%.16s\"", tinfo.model);
Syslog::notice(" serialNumber = \"%.16s\"", tinfo.serialNumber);
Syslog::notice(" flags = 0x%08lx", tinfo.flags);
/*
Syslog::notice(" -> RNG = %s",
tinfo.flags & CKF_RNG ? "TRUE" : "FALSE");
Syslog::notice(" -> WRITE PROTECTED = %s",
tinfo.flags & CKF_WRITE_PROTECTED ? "TRUE" : "FALSE");
Syslog::notice(" -> LOGIN REQUIRED = %s",
tinfo.flags & CKF_LOGIN_REQUIRED ? "TRUE" : "FALSE");
Syslog::notice(" -> USER PIN INITIALIZED = %s",
tinfo.flags & CKF_USER_PIN_INITIALIZED ? "TRUE" : "FALSE");
Syslog::notice(" -> RESTORE KEY NOT NEEDED = %s",
tinfo.flags & CKF_RESTORE_KEY_NOT_NEEDED ? "TRUE" : "FALSE");
Syslog::debug(" -> CLOCK ON TOKEN = %s",
tinfo.flags & CKF_CLOCK_ON_TOKEN ? "TRUE" : "FALSE");
Syslog::notice( " ulMaxSessionCount = %lu", tinfo.ulMaxSessionCount);
Syslog::notice( " ulSessionCount = %lu", tinfo.ulSessionCount);
Syslog::notice( " ulMaxRwSessionCount = %lu", tinfo.ulMaxRwSessionCount);
Syslog::notice(" ulRwSessionCount = %lu", tinfo.ulRwSessionCount);
Syslog::notice( " ulMaxPinLen = %lu", tinfo.ulMaxPinLen);
Syslog::notice(" ulMinPinLen = %lu", tinfo.ulMinPinLen);
Syslog::notice(" ulTotalPublicMemory = %lu", tinfo.ulTotalPublicMemory);
Syslog::notice(" ulFreePublicMemory = %lu", tinfo.ulFreePublicMemory);
Syslog::notice(" ulTotalPrivateMemory = %lu", tinfo.ulTotalPrivateMemory);
Syslog::notice(" ulFreePrivateMemory = %lu", tinfo.ulFreePrivateMemory);
Syslog::notice(" hardwareVersion = %lu.%02lu",
(uint32)tinfo.hardwareVersion.major, (uint32)tinfo.hardwareVersion.minor);
Syslog::notice(" firmwareVersion = %lu.%02lu",
(uint32)tinfo.firmwareVersion.major, (uint32)tinfo.firmwareVersion.minor);
Syslog::notice(" utcTime = \"%.16s\"", tinfo.utcTime);
*/
Syslog::notice(" Token is present uid %s",tinfo.label);
int label_size = 32;
memcpy((void *) mTokenUid, (void *) tinfo.label,label_size);
mTokenUid[label_size -1] = 0;
}
else
{
Syslog::error(" Token not present in slot ");
return result;
}
}
}else
{
return result;
}
return 1;
}
//Actual crypto ops
int CoolKeyPK11::decryptData(CoolKeyObject *aObj,CK_BYTE *aEncData, CK_ULONG aEncDataLen, CK_BYTE *aData, CK_ULONG *aDataLen)
{
int result = 0;
if( !mEpv || !aObj || !aEncData || !aEncDataLen || !aData || !aDataLen
|| aDataLen <=0 || *aDataLen <= 0)
{
Syslog::error(" CoolKeyPK11::decryptData bad input data");
return result;
}
CK_OBJECT_HANDLE objHandle = aObj->getHandle();
CK_RV ck_rv = mEpv->C_DecryptInit(mSessHandle,NULL,objHandle);
Syslog::notice("decryptData C_DecryptInit Init result %d", ck_rv);
if(ck_rv != CKR_OK)
{
Syslog::notice("decryptData error calling C_DecryptInit");
return result;
}
ck_rv = mEpv->C_Decrypt(mSessHandle,aEncData,aEncDataLen,aData,aDataLen);
Syslog::notice("C_Decrypt result %d", ck_rv);
if(ck_rv != CKR_OK)
{
Syslog::notice("C_Decrypt result in error");
return 0;
}
Syslog::notice("decryptData return success");
return 1;
}
int CoolKeyPK11::generateSignature(CoolKeyObject *aObj,CK_BYTE *aData, CK_ULONG aDataLen, CK_BYTE *aSignature, CK_ULONG *aSignatureLen)
{
int result = 0;
if( !mEpv || !aObj || !aData || !aDataLen || !aSignature || !aSignatureLen
|| aDataLen <=0 || *aSignatureLen <= 0)
{
Syslog::error(" CoolKeyPK11::generateSignature bad input data");
return result;
}
CK_OBJECT_HANDLE objHandle = aObj->getHandle();
CK_RV ck_rv = mEpv->C_SignInit(mSessHandle,NULL,objHandle);
Syslog::notice("generateSignature C_SignInit result %d", ck_rv);
if(ck_rv != CKR_OK)
{
Syslog::notice("generatSignature error calling C_SignInit");
return result;
}
ck_rv = mEpv->C_Sign(mSessHandle,aData,aDataLen,aSignature,aSignatureLen);
Syslog::notice("C_Sign result %d", ck_rv);
if(ck_rv != CKR_OK)
{
Syslog::notice("C_Sign result in error");
return 0;
}
Syslog::notice("generateSignature return success");
return 1;
}
void CoolKeyObject::dumpData(CK_CHAR *aData, CK_ULONG aDataLen)
{
char line[256];
Syslog::notice("dumping data %p len %lu",aData,aDataLen);
CK_ULONG max = 8;
for(CK_ULONG i = 0 ; i < aDataLen; i ++)
{
if(i > max)
break;
sprintf(line," val[%lu]= %X",i,aData[i]);
Syslog::notice(line);
}
}
void CoolKeyObject::loadAttributes(CK_ATTRIBUTE *aTemplate,int aTemplateSize)
{
CK_RV ck_rv;
Syslog::notice("CoolKeyObject::loadAttributes with args template size %d",aTemplateSize);
if(!aTemplate || aTemplateSize <= 0 || mAttributesLoaded)
return;
CK_FUNCTION_LIST_PTR funcPtr = NULL;
if(mParent && (funcPtr = mParent->getFunctionPointer()))
{
Syslog::notice("CoolKeyObject::loadAttributes got function pointer");
ck_rv = funcPtr->C_GetAttributeValue(mSessHandle, mObjHandle, aTemplate, aTemplateSize);
switch(ck_rv)
{
case CKR_OK:
case CKR_ATTRIBUTE_SENSITIVE:
case CKR_ATTRIBUTE_TYPE_INVALID:
case CKR_BUFFER_TOO_SMALL:
break;
default:
Syslog::notice("CoolKeyObject::loadAttributes failed ck_rv %d",ck_rv);
return;
break;
};
for(int i = 0 ; i < aTemplateSize ; i++)
{
Syslog::notice("Object attribute: name % stype 0x%lx , size %d",
attributeName(aTemplate[i].type),aTemplate[i].type,
aTemplate[i].ulValueLen);
}
//Do it again to get actual data
for(int i = 0; i < aTemplateSize ; i++)
{
int size = (int)aTemplate[i].ulValueLen;
if(size && size != -1)
{
char *objData = new char [aTemplate[i].ulValueLen];
if(!objData)
{
continue;
}
aTemplate[i].pValue = objData;
}
}
//Now have the data alocated go get it.
ck_rv = funcPtr->C_GetAttributeValue(mSessHandle, mObjHandle, aTemplate, aTemplateSize);
switch(ck_rv)
{
case CKR_OK:
case CKR_ATTRIBUTE_SENSITIVE:
case CKR_ATTRIBUTE_TYPE_INVALID:
case CKR_BUFFER_TOO_SMALL:
break;
default:
Syslog::notice("CoolKeyObject::loadAttributes failed ck_rv %d",ck_rv);
return;
break;
};
//print out results of actually getting the data
for(int i = 0 ; i < aTemplateSize ; i++)
{
int size = aTemplate[i].ulValueLen;
char *data = (char *) aTemplate[i].pValue;
if(size && size != -1 && data)
{
Syslog::notice("Legitimate Object attribute saving.... Name: %s : type 0x%lx , size %d",
attributeName(aTemplate[i].type),aTemplate[i].type,
aTemplate[i].ulValueLen);
CK_ATTRIBUTE * newAttr = new CK_ATTRIBUTE ;
//Check for CAC data, we want to let the Apple CAC TokenD take care of these.
if(strstr(data,"CAC"))
{
Syslog::notice("CAC related item found, exiting... \n");
// exit(0);
}
if(!newAttr)
{
Syslog::notice("Can't allocate memory for new attribute");
continue;
}
newAttr->ulValueLen = aTemplate[i].ulValueLen;
newAttr->type = aTemplate[i].type;
newAttr->pValue = aTemplate[i].pValue;
CoolKeyObject::dumpData((CK_BYTE *)newAttr->pValue,newAttr->ulValueLen);
// put the attribute in our local map
aTemplate[i].ulValueLen = 0;
aTemplate[i].pValue = NULL;
mAttributes[newAttr->type] = newAttr;
}
}
}
}
void CoolKeyKeyObject::loadAttributes()
{
Syslog::notice("CoolKeyKeyObject::loadAttributes no args");
if(mAttributesLoaded)
return;
int templateSize = 0;
if(mObjClass == CKO_PRIVATE_KEY)
{
templateSize = sizeof(private_keyTemplate)/sizeof(CK_ATTRIBUTE);
CoolKeyObject::loadAttributes((CK_ATTRIBUTE *)private_keyTemplate,templateSize);
}
else
{
templateSize = sizeof(public_keyTemplate)/sizeof(CK_ATTRIBUTE);
CoolKeyObject::loadAttributes((CK_ATTRIBUTE *)public_keyTemplate, templateSize);
}
}
CK_BYTE CoolKeyKeyObject::getSensitive()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_SENSITIVE);
Syslog::notice("In CoolKeyObject::getID type %c",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyEncrypt()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_ENCRYPT);
Syslog::notice("In CoolKeyObject::getKeyEncrypt result %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyDecrypt()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_DECRYPT);
Syslog::notice("In CoolKeyObject::getKeyDecrypt type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeySign()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_SIGN);
Syslog::notice("In CoolKeyKeyObject::getKeySign type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyWrap()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_WRAP);
Syslog::notice("In CoolKeyKeyObject::getKeyWrap type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyVerify()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_VERIFY);
Syslog::notice("In CoolKeyKeyObject::getKeyVerify type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyDerive()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_DERIVE);
Syslog::notice("In CoolKeyKeyObject::getKeyDerive type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyUnwrap()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_UNWRAP);
Syslog::notice("In CoolKeyKeyObject::getKeyUnwrap type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeySignRecover()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_SIGN_RECOVER);
Syslog::notice("In CoolKeyKeyObject::getKeySignRecover type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyVerifyRecover()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_VERIFY_RECOVER);
Syslog::notice("In CoolKeyObject::getKeyKeyVerifyRecover type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyExtractable()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_EXTRACTABLE);
Syslog::notice("In CoolKeyKeyObject::getExtractable type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getKeyNeverExtractable()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_NEVER_EXTRACTABLE);
Syslog::notice("In CoolKeyKeyObject::getNeverExtractable type %d",result);
return result;
}
CK_BYTE CoolKeyKeyObject::getAlwaysSensitive()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_ALWAYS_SENSITIVE);
Syslog::notice("In CoolKeyKeyObject::getAlwaysSensitive type %d",result);
return result;
}
void CoolKeyKeyObject::getLabel(CK_BYTE *aData, CK_ULONG *aDataLen)
{
if(!aData || !aDataLen || *aDataLen < 1)
return;
aData[0] = 0;
getByteDataAttribute(CKA_LABEL,aData,aDataLen);
Syslog::notice("In CoolKeyKeyObject::getLabel %s",aData);
}
CK_BYTE CoolKeyObject::getID()
{
CK_BYTE result = 0;
result = getByteAttribute(CKA_ID);
Syslog::notice("In CoolKeyObject::getID type %c",result);
return result;
}
void CoolKeyObject::freeAttributes()
{
Syslog::notice("CoolKeyObject::freeAttributes");
map< CK_ATTRIBUTE_TYPE, CK_ATTRIBUTE * >::iterator i;
CK_ATTRIBUTE *cur = NULL;
for(i = mAttributes.begin(); i!= mAttributes.end(); i++)
{
cur = (*i).second;
if(cur)
{
if(cur->pValue)
delete [] (char *) cur->pValue;
delete cur;
}
}
}
void CoolKeyObject::loadAttributes()
{
//Syslog::notice("CoolKeyObject::loadAttributes no args");
}
void CoolKeyCertObject::loadAttributes()
{
//Syslog::notice("In CoolKeyCertObject::loadAttributes no args");
if(mAttributesLoaded)
return;
int templateSize = sizeof(certTemplate)/sizeof(CK_ATTRIBUTE);
if(!templateSize)
return;
CoolKeyObject::loadAttributes(certTemplate,templateSize);
}
CoolKeyKeyObject::CoolKeyKeyObject(CK_OBJECT_HANDLE aObjHandle, CK_SESSION_HANDLE aSessHandle,CK_LONG aObjClass,CoolKeyPK11 *aParent) : CoolKeyObject(aObjHandle,aSessHandle,aObjClass,aParent)
{
//Syslog::notice("CoolKeyKeyObject::CoolKeyKeyObject");
loadAttributes();
}
CK_ULONG CoolKeyKeyObject::getKeySize()
{
CK_ULONG size = 0;
CK_ATTRIBUTE *theMod = getAttribute(CKA_MODULUS);
if(theMod)
{
size = (theMod->ulValueLen - 1 ) * 8;
}
return size;
}
CoolKeyCertObject::CoolKeyCertObject(CK_OBJECT_HANDLE aObjHandle, CK_SESSION_HANDLE aSessHandle,CK_LONG aObjClass,CoolKeyPK11 *aParent) : CoolKeyObject(aObjHandle,aSessHandle,aObjClass,aParent)
{
loadAttributes();
}
void CoolKeyCertObject::getIssuer(CK_BYTE *aData, CK_ULONG *aDataLen)
{
if(!aData || !aDataLen || *aDataLen < 1)
return;
aData[0] = 0;
getByteDataAttribute(CKA_ISSUER,aData,aDataLen);
}
void CoolKeyCertObject::getSerialNo(CK_BYTE *aData,CK_ULONG *aDataLen)
{
if(!aData || !aDataLen || *aDataLen < 1)
return;
aData[0] = 0;
getByteDataAttribute(CKA_SERIAL_NUMBER,aData,aDataLen);
}
void CoolKeyCertObject::getLabel(CK_BYTE *aData, CK_ULONG *aDataLen)
{
if(!aData || !aDataLen || *aDataLen < 1)
return;
aData[0] = 0;
getByteDataAttribute(CKA_LABEL,aData,aDataLen);
}
void CoolKeyCertObject::getPublicKeyHash(CK_BYTE *aData,CK_ULONG *aDataLen)
{
if(!aData || !aDataLen || *aDataLen < 1)
return;
aData[0] = 0;
}
void CoolKeyCertObject::getData(CK_BYTE *aData, CK_ULONG *aDataLen)
{
if(!aData || !aDataLen || *aDataLen < 1)
return;
aData[0] = 0;
getByteDataAttribute(CKA_VALUE,aData,aDataLen);
}
void CoolKeyCertObject::getSubject(CK_BYTE *aData, CK_ULONG *aDataLen)
{
if(!aData || !aDataLen || *aDataLen < 1)
return;
aData[0] = 0;
getByteDataAttribute(CKA_SUBJECT,aData,aDataLen);
}
CK_ULONG CoolKeyCertObject::getType()
{
CK_ULONG result = 0;
result = getULongAttribute(CKA_CERTIFICATE_TYPE);
Syslog::notice("In CoolKeyCertObject::getType type %lu",result);
return result;
}
CoolKeyObject::CoolKeyObject(CK_OBJECT_HANDLE aObjHandle, CK_SESSION_HANDLE aSessHandle,CK_LONG aObjClass,CoolKeyPK11 *aParent) : mObjHandle(aObjHandle),mSessHandle(aSessHandle),mAttributesLoaded(0),mObjClass(aObjClass),mParent(aParent)
{
Syslog::notice("In CoolKeyObject::CoolKeyObject mObjClass %d",mObjClass);
}
CK_ATTRIBUTE * CoolKeyObject::getAttribute(CK_ATTRIBUTE_TYPE aAttr)
{
CK_ATTRIBUTE *theAttr = mAttributes[aAttr];
return theAttr;
}
CK_LONG CoolKeyObject::getLongAttribute(CK_ATTRIBUTE_TYPE aAttr)
{
CK_ATTRIBUTE *theAttr = getAttribute(aAttr);
if(!theAttr)
return 0;
CK_ULONG size = theAttr->ulValueLen ;
if(size != sizeof(CK_LONG))
return 0;
if(!theAttr->pValue)
return 0;
return (CK_LONG) *((CK_LONG *) theAttr->pValue);
}
CK_ULONG CoolKeyObject::getULongAttribute(CK_ATTRIBUTE_TYPE aAttr)
{
CK_ATTRIBUTE *theAttr = getAttribute(aAttr);
Syslog::notice("In CoolKeyObject::getULongAttr attr %p size %d value %p",theAttr,theAttr->ulValueLen,theAttr->pValue);
if(!theAttr)
return 0;
CK_ULONG size = theAttr->ulValueLen ;
if(size != sizeof(CK_ULONG))
return 0;
if(!theAttr->pValue)
return 0;
return (CK_ULONG) *((CK_ULONG *) theAttr->pValue);
}
CK_BYTE CoolKeyObject::getByteAttribute(CK_ATTRIBUTE_TYPE aAttr)
{
CK_ATTRIBUTE *theAttr = getAttribute(aAttr);
if(!theAttr)
return 0;
CK_ULONG size = theAttr->ulValueLen ;
if(size != sizeof(CK_BYTE))
return 0;
if(!theAttr->pValue)
return 0;
return (CK_BYTE) *((CK_BYTE *) theAttr->pValue);
}
void CoolKeyObject::getByteDataAttribute(CK_ATTRIBUTE_TYPE aAttr,CK_BYTE *aData, CK_ULONG *aDataLen)
{
if(!aData || !aDataLen || *aDataLen <= 0 )
return;
CK_ATTRIBUTE *theAttr = getAttribute(aAttr);
Syslog::notice("In CoolKeyObject::getByteData attr %p attr size %d ",theAttr,theAttr->ulValueLen);
if(!theAttr)
return ;
CK_ULONG size = theAttr->ulValueLen ;
if(size < 1 || size >= *aDataLen)
return;
*aDataLen = 0;
aData[0] = 0;
if(!theAttr->pValue)
return;
memcpy( aData, theAttr->pValue,size);
*aDataLen = size;
}
char *CoolKeyObject::attributeName(uint32_t attributeId)
{
static char buffer[20];
switch (attributeId)
{
case CKA_CLASS: return "CLASS";
case CKA_TOKEN: return "TOKEN";
case CKA_PRIVATE: return "PRIVATE";
case CKA_LABEL: return "LABEL";
case CKA_APPLICATION: return "APPLICATION";
case CKA_VALUE: return "VALUE";
case CKA_OBJECT_ID: return "OBJECT_ID";
case CKA_CERTIFICATE_TYPE: return "CERTIFICATE_TYPE";
case CKA_ISSUER: return "ISSUER";
case CKA_SERIAL_NUMBER: return "SERIAL_NUMBER";
case CKA_AC_ISSUER: return "AC_ISSUER";
case CKA_OWNER: return "OWNER";
case CKA_ATTR_TYPES: return "ATTR_TYPES";
case CKA_TRUSTED: return "TRUSTED";
case CKA_KEY_TYPE: return "KEY_TYPE";
case CKA_SUBJECT: return "SUBJECT";
case CKA_ID: return "ID";
case CKA_SENSITIVE: return "SENSITIVE";
case CKA_ENCRYPT: return "ENCRYPT";
case CKA_DECRYPT: return "DECRYPT";
case CKA_WRAP: return "WRAP";
case CKA_WRAP_TEMPLATE: return "WRAP_TEMPLATE";
case CKA_UNWRAP: return "UNWRAP";
case CKA_SIGN: return "SIGN";
case CKA_SIGN_RECOVER: return "SIGN_RECOVER";
case CKA_VERIFY: return "VERIFY";
case CKA_VERIFY_RECOVER: return "VERIFY_RECOVER";
case CKA_DERIVE: return "DERIVE";
case CKA_START_DATE: return "START_DATE";
case CKA_END_DATE: return "END_DATE";
case CKA_MODULUS: return "MODULUS";
case CKA_MODULUS_BITS: return "MODULUS_BITS";
case CKA_PUBLIC_EXPONENT: return "PUBLIC_EXPONENT";
case CKA_PRIVATE_EXPONENT: return "PRIVATE_EXPONENT";
case CKA_PRIME_1: return "PRIME_1";
case CKA_PRIME_2: return "PRIME_2";
case CKA_EXPONENT_1: return "EXPONENT_1";
case CKA_EXPONENT_2: return "EXPONENT_2";
case CKA_COEFFICIENT: return "COEFFICIENT";
case CKA_PRIME: return "PRIME";
case CKA_SUBPRIME: return "SUBPRIME";
case CKA_BASE: return "BASE";
case CKA_PRIME_BITS: return "PRIME_BITS";
case CKA_SUB_PRIME_BITS: return "SUB_PRIME_BITS";
case CKA_VALUE_BITS: return "VALUE_BITS";
case CKA_VALUE_LEN: return "VALUE_LEN";
case CKA_EXTRACTABLE: return "EXTRACTABLE";
case CKA_LOCAL: return "LOCAL";
case CKA_NEVER_EXTRACTABLE: return "NEVER_EXTRACTABLE";
case CKA_ALWAYS_SENSITIVE: return "ALWAYS_SENSITIVE";
case CKA_KEY_GEN_MECHANISM: return "KEY_GEN_MECHANISM";
case CKA_MODIFIABLE: return "MODIFIABLE";
case CKA_EC_PARAMS: return "EC_PARAMS";
case CKA_EC_POINT: return "EC_POINT";
case CKA_SECONDARY_AUTH: return "SECONDARY_AUTH";
case CKA_AUTH_PIN_FLAGS: return "AUTH_PIN_FLAGS";
case CKA_HW_FEATURE_TYPE: return "HW_FEATURE_TYPE";
case CKA_RESET_ON_INIT: return "RESET_ON_INIT";
case CKA_HAS_RESET: return "HAS_RESET";
case CKA_VENDOR_DEFINED: return "VENDOR_DEFINED";
case CKA_ALWAYS_AUTHENTICATE: return "ALWAYS_AUTHENTICATE";
case CKA_WRAP_WITH_TRUSTED: return "WRAP_WITH_TRUSTED";
case CKA_UNWRAP_TEMPLATE: return "UNWRAP_TEMPLATE";
case CKA_HASH_OF_SUBJECT_PUBLIC_KEY: return "HASH_OF_SUBJECT_PUBLIC_KEY";
case CKA_HASH_OF_ISSUER_PUBLIC_KEY: return "HASH_OF_ISSUER_PUBLIC_KEY";
default:
snprintf(buffer, sizeof(buffer), "unknown(%0x08X)", attributeId);
return buffer;
}
}
--- NEW FILE CoolKeyPK11.h ---
/*
* CoolKeyPK11.h
* Tokend CoolKey
*/
#ifndef _COOLKEYPK11_H_
#define _COOLKEYPK11_H_
#include "mypkcs11.h"
//#include <Security/SecKey.h>
#include <map>
#include <string>
#define COOLKEY_MAX_SLOTS 20
#define PKCS11_PATH_NAME "/Library/Application Support/CoolKey/PKCS11/libcoolkeypk11.dylib"
class CoolKeyPK11;
class CoolKeyObject
{
public:
CoolKeyObject(CK_OBJECT_HANDLE aObjHandle, CK_SESSION_HANDLE aSessHandle,CK_LONG aObjClass,CoolKeyPK11 *aParent);
virtual ~CoolKeyObject() { freeAttributes();};
virtual void loadAttributes() ;
char *CoolKeyObject::attributeName(uint32_t attributeId);
CK_ATTRIBUTE * getAttribute(CK_ATTRIBUTE_TYPE aAttr);
CK_LONG getLongAttribute(CK_ATTRIBUTE_TYPE aAttr);
CK_ULONG getULongAttribute(CK_ATTRIBUTE_TYPE aAttr);
CK_BYTE getByteAttribute(CK_ATTRIBUTE_TYPE aAttr);
CK_BYTE getID();
void getByteDataAttribute(CK_ATTRIBUTE_TYPE aAttr,CK_BYTE *aData, CK_ULONG *aDataLen);
CK_OBJECT_CLASS getClass() {return mObjClass;}
static void dumpData(CK_BYTE *aData, CK_ULONG aDataLen);
CK_OBJECT_HANDLE getHandle() { return mObjHandle;}
CK_SESSION_HANDLE getSessHandle() { return mSessHandle; }
protected:
void loadAttributes(CK_ATTRIBUTE *aTemplate,int aTemplateSize);
void freeAttributes();
CK_OBJECT_HANDLE mObjHandle;
CK_SESSION_HANDLE mSessHandle;
int mAttributesLoaded;
CK_LONG mObjClass;
std::map< CK_ATTRIBUTE_TYPE, CK_ATTRIBUTE* > mAttributes;
private:
CoolKeyPK11 *mParent;
public:
};
class CoolKeyKeyObject : public CoolKeyObject
{
public:
CoolKeyKeyObject(CK_OBJECT_HANDLE aObjHandle, CK_SESSION_HANDLE aSessionHandle,CK_LONG aObjClass,CoolKeyPK11 *aParent) ;
CK_ULONG getKeySize();
void getLabel(CK_BYTE *aData, CK_ULONG *aDataLen);
CK_BYTE getSensitive();
CK_BYTE getAlwaysSensitive();
CK_BYTE getKeyEncrypt();
CK_BYTE getKeyDecrypt();
CK_BYTE getKeySign();
CK_BYTE getKeyWrap();
CK_BYTE getKeyExtractable();
CK_BYTE getKeyNeverExtractable();
CK_BYTE getKeyVerify();
CK_BYTE getKeyDerive();
CK_BYTE getKeyUnwrap();
CK_BYTE getKeySignRecover();
CK_BYTE getKeyVerifyRecover();
void loadAttributes();
~CoolKeyKeyObject() {};
};
class CoolKeyCertObject : public CoolKeyObject
{
public:
CoolKeyCertObject(CK_OBJECT_HANDLE aObjHandle, CK_SESSION_HANDLE aSessionHandle,CK_LONG aObjClass,CoolKeyPK11 *aParent) ;
void loadAttributes();
void getSubject(CK_BYTE *aData, CK_ULONG *aDataLen);
void getIssuer(CK_BYTE *aData, CK_ULONG *aDataLen);
void getSerialNo(CK_BYTE *aData,CK_ULONG *aDataLen);
void getLabel(CK_BYTE *aData, CK_ULONG *aDataLen);
void getData(CK_BYTE *aData, CK_ULONG *aDataLen);
void getPublicKeyHash(CK_BYTE *aData,CK_ULONG *aDataLen);
CK_ULONG getType();
~CoolKeyCertObject() {};
};
class CoolKeyPK11
{
public:
typedef std::map< CK_OBJECT_HANDLE, CoolKeyObject * >::iterator ObjIterator;
CoolKeyPK11(): mPk11Driver(NULL),mEpv(NULL),mInitialized(0),mOurSlotIndex(0),mIsOurToken(0),mCachedPIN("") {} ;
virtual ~CoolKeyPK11() {};
int loadModule();
int freeModule();
int loginToken(char *aPIN);
void logoutToken();
int isTokenLoggedIn();
int loadObjects();
int freeObjects();
int getIsOurToken() { return mIsOurToken;}
char *getTokenId() {
if(mTokenUid[0] != 0)
return mTokenUid;
else
return NULL;
};
CK_FUNCTION_LIST_PTR getFunctionPointer() { return mEpv;}
int getInitialized() { return mInitialized; }
int verifyCachedPIN(char *aPIN);
//Actual cryto operations
int generateSignature(CoolKeyObject *aObj,CK_BYTE *aData, CK_ULONG aDataLen, CK_BYTE *aSignature, CK_ULONG *aSignatureLen);
int decryptData(CoolKeyObject *aObj,CK_BYTE *aEncData, CK_ULONG aEncDataLen, CK_BYTE *aData, CK_ULONG *aDataLen);
protected:
private:
int loadSlotList();
void * mPk11Driver;
CK_FUNCTION_LIST_PTR mEpv;
int mInitialized;
CK_SLOT_ID mSlots[COOLKEY_MAX_SLOTS];
int mOurSlotIndex;
CK_SLOT_INFO mOurSlotInfo;
char mTokenUid[32];
int mIsOurToken;
CK_SESSION_HANDLE mSessHandle;
std::map<CK_OBJECT_HANDLE , CoolKeyObject * > mObjects;
std::string mCachedPIN;
public:
ObjIterator begin() { return ObjIterator(mObjects.begin()); }
ObjIterator end() { return ObjIterator(mObjects.end()); }
};
#endif /* !_COOLKEYPK11_H_ */
--- NEW FILE CoolKeyRecord.cpp ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source LicenseCoolKey
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyRecord.cpp
* Tokend CoolKey
*/
#include "CoolKeyPK11.h"
#include "CoolKeyRecord.h"
#include "CoolKeyError.h"
#include "CoolKeyToken.h"
//#include "Attribute.h"
#include "MetaAttribute.h"
#include "MetaRecord.h"
#include <security_cdsa_client/aclclient.h>
#include <Security/SecKey.h>
#include <security_utilities/logging.h>
//
// CoolKeyRecord
//
CoolKeyRecord::~CoolKeyRecord()
{
}
Tokend::Attribute *CoolKeyRecord::getDataAttribute(Tokend::TokenContext *tokenContext)
{
Syslog::notice("CoolKeyRecord::getDataAttribute");
CoolKeyObject *obj = (CoolKeyObject *) getCoolKeyObject();
CK_OBJECT_CLASS theClass = 0;
if(obj)
{
theClass = obj->getClass();
}
if(!obj)
return NULL;
CK_BYTE tData[2048];
CK_ULONG dataLen = 2048;
CoolKeyCertObject *theCert = NULL;
switch(theClass)
{
case CKO_CERTIFICATE:
Syslog::notice("getDataAttribute: Found certificate:-----------------");
theCert = (CoolKeyCertObject *) obj;
if(theCert)
{
theCert->getData((CK_BYTE *)tData,&dataLen);
}
return new Tokend::Attribute((const void *)tData,dataLen);
break;
case CKO_PUBLIC_KEY:
Syslog::notice("getDataAttribute:Found public key:----------------");
break;
case CKO_PRIVATE_KEY:
Syslog::notice("getDataAttribute:Found private key:-------------------");
break;
default:
Syslog::notice("getDataAttribute:Found something else:");
break;
};
return NULL;
}
void CoolKeyRecord::getAcl(const char *tag, uint32 &count, AclEntryInfo *&acls)
{
Allocator &alloc = Allocator::standard();
Syslog::notice("CoolKeyRecord::getAcl ----------------");
if (!mAclEntries) {
mAclEntries.allocator(alloc);
// Anyone can read the DB record for this key (which is a reference
// CSSM_KEY)
mAclEntries.add(CssmClient::AclFactory::AnySubject(
mAclEntries.allocator()),
AclAuthorizationSet(CSSM_ACL_AUTHORIZATION_DB_READ, 0));
}
count = mAclEntries.size();
acls = mAclEntries.entries();
Syslog::notice("CoolKeyRecord::getAcl done");
}
/* arch-tag: 9703BFF8-0E73-11D9-ACDD-000A9595DEEE */
--- NEW FILE CoolKeyRecord.h ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyRecord.h
* TokendMuscle
*/
#ifndef _COOLKEYRECORD_H_
#define _COOLKEYRECORD_H_
#include "Record.h"
#include "CoolKeyPK11.h"
//class CoolKeyObject;
class CoolKeyRecord : public Tokend::Record
{
NOCOPY(CoolKeyRecord)
public:
CoolKeyRecord(CoolKeyObject *aObject) :
mObject(aObject) {}
virtual ~CoolKeyRecord();
CoolKeyObject *getCoolKeyObject() { return mObject; }
virtual Tokend::Attribute *getDataAttribute(Tokend::TokenContext *tokenContext);
virtual void getAcl(const char *tag, uint32 &count,
AclEntryInfo *&aclList);
private:
AutoAclEntryInfoList mAclEntries;
protected:
CoolKeyObject *mObject;
};
#endif /* !_CACRECORD_H_ */
/* arch-tag: 96BC854C-0E73-11D9-B9B1-000A9595DEEE */
--- NEW FILE CoolKeySchema.cpp ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
* CoolKey
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeySchema.cpp
* Tokend CoolKey
*/
#include "CoolKeySchema.h"
#include "MetaAttribute.h"
#include "MetaRecord.h"
#include <Security/SecCertificate.h>
#include <Security/SecKeychainItem.h>
#include <Security/SecKey.h>
#include <Security/SecKeychainItemPriv.h>
#include <security_utilities/logging.h>
#include <Security/cssmapple.h>
using namespace Tokend;
CoolKeySchema::CoolKeySchema()
{
}
CoolKeySchema::~CoolKeySchema()
{
}
Tokend::Relation *CoolKeySchema::createKeyRelation(CSSM_DB_RECORDTYPE keyType)
{
Relation *rn = createStandardRelation(keyType);
Syslog::info("createKeyRelation coder %p",&mCoolKeyKeyAttributeCoder);
// Set up coders for key records.
MetaRecord &mr = rn->metaRecord();
mr.keyHandleFactory(&mCoolKeyKeyHandleFactory);
mr.attributeCoder(kSecKeyPrintName, &mCoolKeyKeyAttributeCoder);
// Other key valuess
mr.attributeCoder(kSecKeyKeyType, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyKeySizeInBits, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyEffectiveKeySize, &mCoolKeyKeyAttributeCoder);
// Key attributes
mr.attributeCoder(kSecKeyExtractable, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeySensitive, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyModifiable, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyPrivate, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyNeverExtractable, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyAlwaysSensitive, &mCoolKeyKeyAttributeCoder);
// Key usage
mr.attributeCoder(kSecKeyEncrypt, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyDecrypt, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyWrap, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyUnwrap,&mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyVerify, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyDerive, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeySignRecover, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyVerifyRecover, &mCoolKeyKeyAttributeCoder);
mr.attributeCoder(kSecKeyLabel, &mPublicKeyHashCoder);
mr.attributeCoder(kSecKeySign, &mCoolKeyKeyAttributeCoder);
return rn;
}
Tokend::Relation *CoolKeySchema::createCertRelation(CSSM_DB_RECORDTYPE certType)
{
Relation *rn = createStandardRelation(certType);
// Set up coders for key records.
MetaRecord &mr = rn->metaRecord();
Syslog::info("createCertRelation coder %p",&mCoolKeyCertAttributeCoder);
// cert attributes
mr.attributeCoder(kSecAlias,&mCoolKeyCertAttributeCoder);
mr.attributeCoder(kSecSubjectItemAttr, &mCoolKeyCertAttributeCoder);
mr.attributeCoder(kSecLabelItemAttr,&mCoolKeyCertAttributeCoder);
mr.attributeCoder(kSecIssuerItemAttr, &mCoolKeyCertAttributeCoder);
mr.attributeCoder(kSecSerialNumberItemAttr, &mCoolKeyCertAttributeCoder);
mr.attributeCoder(kSecPublicKeyHashItemAttr, &mCoolKeyCertAttributeCoder);
mr.attributeCoder(kSecSubjectKeyIdentifierItemAttr, &mCoolKeyCertAttributeCoder);
mr.attributeCoder(kSecCertTypeItemAttr, &mCoolKeyCertAttributeCoder);
mr.attributeCoder(kSecCertEncodingItemAttr, &mCoolKeyCertAttributeCoder);
return rn;
}
void CoolKeySchema::create()
{
Schema::create();
createStandardRelation(CSSM_DL_DB_RECORD_X509_CERTIFICATE);
createKeyRelation(CSSM_DL_DB_RECORD_PRIVATE_KEY);
Relation *rn_publ = createKeyRelation(CSSM_DL_DB_RECORD_PUBLIC_KEY);
// @@@ We need a coder that calculates the public key hash of a public key
rn_publ->metaRecord().attributeCoder(kSecKeyLabel, &mPublicKeyHashCoder);
}
/* arch-tag: 36BF1864-0DBC-11D9-8518-000A9595DEEE */
--- NEW FILE CoolKeySchema.h ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeySchema.h
* TokendMuscle
*/
#ifndef _COOLKEYCHEMA_H_
#define _COOLKEYSCHEMA_H_
#include "Schema.h"
#include "CoolKeyAttributeCoder.h"
#include "CoolKeyHandle.h"
namespace Tokend
{
class Relation;
class MetaRecord;
class AttributeCoder;
}
class CoolKeySchema : public Tokend::Schema
{
NOCOPY(CoolKeySchema)
public:
CoolKeySchema();
virtual ~CoolKeySchema();
virtual void create();
protected:
Tokend::Relation *createKeyRelation(CSSM_DB_RECORDTYPE keyType);
Tokend::Relation *createCertRelation(CSSM_DB_RECORDTYPE certType);
private:
// Coders we need.
CoolKeyDataAttributeCoder mCoolKeyDataAttributeCoder;
CoolKeyCertAttributeCoder mCoolKeyCertAttributeCoder;
CoolKeyKeyAttributeCoder mCoolKeyKeyAttributeCoder;
CoolKeyKeyHandleFactory mCoolKeyKeyHandleFactory;
};
#endif /* !_CACSCHEMA_H_ */
/* arch-tag: 36DB400E-0DBC-11D9-A9F5-000A9595DEEE */
--- NEW FILE CoolKeyToken.cpp ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
* CoolKey
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyToken.cpp
* Tokend CoolKey
*/
#include "CoolKeyToken.h"
#include "Adornment.h"
#include "AttributeCoder.h"
#include "CoolKeyError.h"
#include "CoolKeyRecord.h"
#include "CoolKeySchema.h"
#include <security_cdsa_client/aclclient.h>
#include <security_cdsa_utilities/cssmerrors.h>
#include <security_utilities/logging.h>
#include <security_utilities/refcount.h>
#include <map>
#include <vector>
#include <dlfcn.h>
#include <csignal>
using CssmClient::AclFactory;
static CoolKeyPK11 *coolKeyModule = NULL;
CoolKeyToken::CoolKeyToken() :
mCurrentApplet(NULL),
mPinStatus(1)
{
mTokenContext = this;
}
CoolKeyToken::~CoolKeyToken()
{
Syslog::notice("CoolKeyToken::~CoolKeyToken");
delete mSchema;
}
// Here is where we initialize our PKCS11 module
void CoolKeyToken::initial()
{
Syslog::notice("In CoolKeyToken::initial() . " );
}
bool CoolKeyToken::identify()
{
Syslog::notice("In CoolKeyToken::identify");
return true;
}
void CoolKeyToken::select(const unsigned char *applet)
{
Syslog::debug("In CoolKeyToken::select");
}
uint32_t CoolKeyToken::exchangeAPDU(const unsigned char *apdu, size_t apduLength,
unsigned char *result, size_t &resultLength)
{
return 0;
}
void CoolKeyToken::didDisconnect()
{
Syslog::debug("In CoolKeyToken::didDisconnect");
}
void CoolKeyToken::didEnd()
{
mCurrentApplet = NULL;
}
void CoolKeyToken::changePIN(int pinNum,
const unsigned char *oldPin, size_t oldPinLength,
const unsigned char *newPin, size_t newPinLength)
{
Syslog::debug("In CoolKeyToken::changePIN");
}
uint32_t CoolKeyToken::pinStatus(int pinNum)
{
Syslog::notice("In CoolKeyToken::pinStatus num %d",pinNum);
CssmError::throwMe(CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED);
}
bool CoolKeyToken::isLocked()
{
int result = mCoolKey.isTokenLoggedIn();
mPinStatus = 1 - result;
Syslog::notice("In CoolKeyToken::isLocked mPinStatus %d",mPinStatus);
return mPinStatus;
}
void CoolKeyToken::verifyPIN(int pinNum,
const unsigned char *pin, size_t pinLength)
{
Syslog::notice("In CoolKeyToken::verifyPIN");
int result = 0;
if(mCoolKey.isTokenLoggedIn())
{
result = mCoolKey.verifyCachedPIN((char *) pin);
}
else
{
result = mCoolKey.loginToken((char *) pin);
}
Syslog::notice("Result of loginToken %d",result);
if(result == CKR_OK)
return;
//logout because we failed
mCoolKey.logoutToken();
//any other error complain
CssmError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED);
}
void CoolKeyToken::unverifyPIN(int pinNum)
{
Syslog::notice("In CoolKeyToken::unverifyPIN");
mPinStatus = 1;
}
uint32_t CoolKeyToken::getData(unsigned char *result, size_t &resultLength)
{
Syslog::notice("In CoolKeyToken::getData");
return NULL;
}
uint32 CoolKeyToken::probe(SecTokendProbeFlags flags,
char tokenUid[TOKEND_MAX_UID])
{
uint32 score = 0; //Tokend::ISO7816Token::probe(flags, tokenUid);
uint32 max_uid = TOKEND_MAX_UID;
const SCARD_READERSTATE &readerState = *(*startupReaderInfo)();
Syslog::notice("TOKEND_MAX_UID %d",max_uid);
Syslog::notice("READER_STATE -> szReader %s", (char *) readerState.szReader);
Syslog::notice ("READER_STATE -> dwCurrentState %u",readerState.dwCurrentState);
Syslog::notice ("READER_STATE -> dwEventState %u",readerState.dwEventState);
Syslog::notice ("READER_STATE -> cbAtr %u",readerState.cbAtr);
Syslog::notice("READER_STATE -> rgbAtr %32x",(char *) readerState.rgbAtr);
int res = mCoolKey.loadModule();
/* if(res)
res = mCoolKey.loadObjects();
*/
if(!res || ! mCoolKey.getIsOurToken())
{
Syslog::error(" Can't load CoolKey pkcs11 module. ");
return score;
}
if(coolKeyModule == NULL)
coolKeyModule = &mCoolKey;
char *tUid = mCoolKey.getTokenId();
if(tUid)
{
sprintf((char *) tokenUid,"%s",(char *)tUid);
Syslog::notice("tokenUid %s",(char *) tokenUid);
}
score = 299;
signal(SIGTERM, cleanup); // register a SIGTERM handler
return score;
}
void CoolKeyToken::establish(const CSSM_GUID *guid, uint32 subserviceId,
SecTokendEstablishFlags flags, const char *cacheDirectory,
const char *workDirectory, char mdsDirectory[PATH_MAX],
char printName[PATH_MAX])
{
char *mCuid = mCoolKey.getTokenId();
int pathSize = PATH_MAX;
if(mCuid)
{
Syslog::notice("printName size %d", pathSize);
int predictedSize = strlen(mCuid);
if(predictedSize < pathSize)
{
sprintf((char *) printName, (char *) "%s",mCuid);
}
}
Syslog::notice("In CoolKeyToken::establish setting printName to: %s subserviceId: %d",printName,subserviceId);
int res = mCoolKey.loadObjects();
if(!res)
return;
mSchema = new CoolKeySchema();
mSchema->create();
populate();
}
//
// Authenticate to the token
//
void CoolKeyToken::authenticate(CSSM_DB_ACCESS_TYPE mode, const AccessCredentials *cred)
{
Syslog::notice("In CoolKeyToken::authenticate mode %d cred %p tag %s size %d",mode, cred,cred->tag(),cred->size());
if (cred) {
if(mode == CSSM_DB_ACCESS_RESET)
{
Syslog::notice("authenticate CSSM_DB_ACCESS_RESET");
return;
}
const TypedList &sample = (*cred)[0];
switch (sample.type()) {
case CSSM_SAMPLE_TYPE_PASSWORD:
case CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD:
case CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD:
{
Syslog::notice("sample type %d",sample.type());
CssmData &pin = sample[1].data();
verifyPIN(1, pin.Data,pin.Length);
}
break;
default:
Syslog::notice("sample type %ld not supported", sample.type());
CssmError::throwMe(CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED);
}
} else
Syslog::notice("authenticate without credentials ignored");
}
//
// Database-level ACLs
//
void CoolKeyToken::getOwner(AclOwnerPrototype &owner)
{
Syslog::notice("In CoolKeyToken::getOwner");
// we don't really know (right now), so claim we're owned by PIN #0
if (!mAclOwner)
{
mAclOwner.allocator(Allocator::standard());
mAclOwner = AclFactory::PinSubject(Allocator::standard(), 0);
}
owner = mAclOwner;
}
void CoolKeyToken::getAcl(const char *tag, uint32 &count, AclEntryInfo *&acls)
{
Syslog::notice("In CoolKeyToken::getAcl.");
Allocator &alloc = Allocator::standard();
// mAclEntries sets the handle of each AclEntryInfo to the
// offset in the array.
if (!mAclEntries) {
mAclEntries.allocator(alloc);
// Anyone can read the attributes and data of any record on this token
// (it's further limited by the object itself).
mAclEntries.add(CssmClient::AclFactory::AnySubject(
mAclEntries.allocator()),
AclAuthorizationSet(CSSM_ACL_AUTHORIZATION_DB_READ, 0));
// We support PIN1 with either a passed in password
// subject or a prompted password subject.
mAclEntries.addPin(AclFactory::PWSubject(alloc),1);
mAclEntries.addPin(AclFactory::PromptPWSubject(alloc,CssmData()), 1);
}
count = mAclEntries.size();
acls = mAclEntries.entries();
}
#pragma mark ---------------- CoolKey Specific --------------
void CoolKeyToken::populate()
{
Syslog::notice("In CoolKeyToken::populate");
Tokend::Relation &certRelation = mSchema->findRelation(CSSM_DL_DB_RECORD_X509_CERTIFICATE);
Tokend::Relation &privateKeyRelation = mSchema->findRelation(CSSM_DL_DB_RECORD_PRIVATE_KEY);
Tokend::Relation &publicKeyRelation = mSchema->findRelation(CSSM_DL_DB_RECORD_PUBLIC_KEY);
std::map<int, CoolKeyObject *> certs;
std::map< CoolKeyObject *, RefPointer<CoolKeyRecord> > keys;
std::map< CoolKeyObject *, RefPointer<CoolKeyRecord> > certRecs;
for(CoolKeyPK11::ObjIterator i = mCoolKey.begin(); i != mCoolKey.end() ; i++)
{
CoolKeyObject *obj =(*i).second;
CK_OBJECT_CLASS oClass;
if(obj)
{
CK_BYTE id = obj->getID();
oClass = obj->getClass();
Syslog::notice("Retrieved object %p class %lu id %d",obj,oClass,id);
CoolKeyRecord *newRecord = new CoolKeyRecord(obj);
RefPointer<CoolKeyRecord> theRecord( newRecord);
if(!theRecord)
continue;
switch(oClass)
{
case CKO_PRIVATE_KEY:
privateKeyRelation.insertRecord(theRecord);
Syslog::notice("Inserting private key record %p",newRecord);
keys[obj] = theRecord;
break;
case CKO_PUBLIC_KEY:
Syslog::notice("Inserting public key record %p theRefRecord %p",newRecord,theRecord.get());
publicKeyRelation.insertRecord(theRecord);
keys[obj] = theRecord;
break;
case CKO_CERTIFICATE:
certs[id] = obj;
certRecs[obj] = theRecord;
Syslog::notice("Inserting cert record %p",newRecord);
certRelation.insertRecord(theRecord);
break;
default:
break;
};
}
}
for(CoolKeyPK11::ObjIterator i = mCoolKey.begin(); i != mCoolKey.end() ; i++)
{
CoolKeyObject *obj =(*i).second;
CoolKeyObject *cert = NULL;
CK_OBJECT_CLASS oClass;
if(obj)
{
CK_BYTE id = obj->getID();
oClass = obj->getClass();
switch(oClass)
{
case CKO_PRIVATE_KEY:
case CKO_PUBLIC_KEY:
cert = certs[id];
if(cert)
{
RefPointer<CoolKeyRecord> coolKeyRecRef = keys[obj];
CoolKeyRecord * coolKeyRec = coolKeyRecRef.get();
Syslog::notice("Key %p linked to cert %p",obj,cert);
if(coolKeyRec)
{
Syslog::notice("Found record to create adornment record: %p",coolKeyRec);
if(certRecs[cert])
{
Tokend::LinkedRecordAdornment * lra = new Tokend::LinkedRecordAdornment(certRecs[cert]);
Syslog::notice("lra %p",lra);
if(lra)
{
coolKeyRec->setAdornment(mSchema->publicKeyHashCoder().certificateKey(),
lra);
Syslog::notice("certificateKey %p certRecs[cert] %p",mSchema->publicKeyHashCoder().certificateKey(),certRecs[cert].get());
}
}
}
}
else
Syslog::notice("Key %p not linked to found cert");
break;
default:
break;
};
}
}
}
void CoolKeyToken::cleanup(int aSig)
{
Syslog::notice("We are going away!");
if(coolKeyModule)
{
coolKeyModule->logoutToken();
coolKeyModule->freeModule();
}
}
/* arch-tag: 36F733B4-0DBC-11D9-914C-000A9595DEEE */
--- NEW FILE CoolKeyToken.h ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this filCoolKeye except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKeyToken.h
* Tokend CoolKey
*/
#ifndef _COOLKEY_TOKEN_H_
#define _COOLKEY_TOKEN_H_
#include "mypkcs11.h"
#include <Token.h>
#include "TokenContext.h"
#include "CoolKeyPK11.h"
#include <security_utilities/pcsc++.h>
class CoolKeySchema;
#define PKCS11_PATH_NAME "/Library/Application Support/CoolKey/PKCS11/libcoolkeypk11.dylib"
#define COOLKEY_PRESENT_SCORE 10000000
//
// "The" token
//
class CoolKeyToken : public Tokend::ISO7816Token
{
NOCOPY(CoolKeyToken)
public:
CoolKeyToken() ;
~CoolKeyToken();
virtual void didDisconnect();
virtual void didEnd();
virtual void initial();
virtual uint32 probe(SecTokendProbeFlags flags,
char tokenUid[TOKEND_MAX_UID]);
virtual void establish(const CSSM_GUID *guid, uint32 subserviceId,
SecTokendEstablishFlags flags, const char *cacheDirectory,
const char *workDirectory, char mdsDirectory[PATH_MAX],
char printName[PATH_MAX]);
virtual void getOwner(AclOwnerPrototype &owner);
virtual void getAcl(const char *tag, uint32 &count, AclEntryInfo *&acls);
virtual void changePIN(int pinNum,
const unsigned char *oldPin, size_t oldPinLength,
const unsigned char *newPin, size_t newPinLength);
virtual uint32_t pinStatus(int pinNum);
virtual void verifyPIN(int pinNum, const unsigned char *pin, size_t pinLength);
virtual void unverifyPIN(int pinNum);
virtual void authenticate(CSSM_DB_ACCESS_TYPE mode, const AccessCredentials *cred);
virtual bool isLocked();
bool identify();
void select(const unsigned char *applet);
uint32_t exchangeAPDU(const unsigned char *apdu, size_t apduLength,
unsigned char *result, size_t &resultLength);
uint32_t getData(unsigned char *result, size_t &resultLength);
CoolKeyPK11 &getPK11Manager() { return mCoolKey; }
protected:
void populate();
CoolKeyPK11 mCoolKey;
public:
const unsigned char *mCurrentApplet;
uint32_t mPinStatus;
// temporary ACL cache hack - to be removed
AutoAclOwnerPrototype mAclOwner;
AutoAclEntryInfoList mAclEntries;
private:
static void cleanup(int aSig);
};
#endif /* !_CACTOKEN_H_ */
/* arch-tag: 3714259E-0DBC-11D9-8D58-000A9595DEEE */
--- NEW FILE Info.plist ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>COOLKEY</string>
<key>CFBundleIdentifier</key>
<string>com.apple.tokend.coolkey</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>COOLKEY</string>
<key>CFBundlePackageType</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>30557</string>
</dict>
</plist>
--- NEW FILE coolkey.cpp ---
/*
* Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@CoolKey
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* CoolKey.cpp - CoolKey.tokend main program
*/
#include "CoolKeyToken.h"
#include <security_utilities/logging.h>
int main(int argc, const char *argv[])
{
secdebug("CoolKey.tokend", "main starting with %d arguments", argc);
secdelay("/tmp/delay/CoolKey");
Syslog::notice("argc %d",argc);
for(int i = 0; i < argc ; i++)
{
Syslog::notice("coolkey arg[%d]: %s",i,argv[i]);
}
token = new CoolKeyToken();
return SecTokendMain(argc, argv, token->callbacks(), token->support());
Syslog::notice("CoolKey.tokend exiting.... ");
}
/* arch-tag: 372EB7FE-0DBC-11D9-9A28-000A9595DEEE */
--- NEW FILE dlfcn.h ---
/*
* Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
Based on the dlcompat work done by:
Jorge Acereda <jacereda(a)users.sourceforge.net> &
Peter O'Gorman <ogorman(a)users.sourceforge.net>
*/
#ifndef _DLFCN_H_
#define _DLFCN_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/cdefs.h>
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#include <stdbool.h>
#include <AvailabilityMacros.h>
/*
* Structure filled in by dladdr().
*/
typedef struct dl_info {
const char *dli_fname; /* Pathname of shared object */
void *dli_fbase; /* Base address of shared object */
const char *dli_sname; /* Name of nearest symbol */
void *dli_saddr; /* Address of nearest symbol */
} Dl_info;
extern int dladdr(const void *, Dl_info *);
#endif /* not POSIX */
extern int dlclose(void * __handle);
extern char * dlerror(void);
extern void * dlopen(const char * __path, int __mode);
extern void * dlsym(void * __handle, const char * __symbol);
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
extern bool dlopen_preflight(const char* __path) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
#endif /* not POSIX */
#define RTLD_LAZY 0x1
#define RTLD_NOW 0x2
#define RTLD_LOCAL 0x4
#define RTLD_GLOBAL 0x8
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#define RTLD_NOLOAD 0x10
#define RTLD_NODELETE 0x80
#define RTLD_FIRST 0x100 /* Mac OS X 10.5 and later */
/*
* Special handle arguments for dlsym().
*/
#define RTLD_NEXT ((void *) -1) /* Search subsequent objects. */
#define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */
#define RTLD_SELF ((void *) -3) /* Search this and subsequent objects (Mac OS X 10.5 and later) */
#endif /* not POSIX */
#ifdef __cplusplus
}
#endif
#endif /* _DLFCN_H_ */
14 years
esc/mac/Tokend-35209 APPLE_LICENSE, NONE, 1.1 testcms.sh, NONE, 1.1 testssl.sh, NONE, 1.1
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16499
Added Files:
APPLE_LICENSE testcms.sh testssl.sh
Log Message:
Add directory for Tokend-35209 for Leopard.
--- NEW FILE APPLE_LICENSE ---
APPLE PUBLIC SOURCE LICENSE
Version 2.0 - August 6, 2003
Please read this License carefully before downloading this software.
By downloading or using this software, you are agreeing to be bound by
the terms of this License. If you do not or cannot agree to the terms
of this License, please do not download or use the software.
1. General; Definitions. This License applies to any program or other
work which Apple Computer, Inc. ("Apple") makes publicly available and
which contains a notice placed by Apple identifying such program or
work as "Original Code" and stating that it is subject to the terms of
this Apple Public Source License version 2.0 ("License"). As used in
this License:
1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is
the grantor of rights, (i) claims of patents that are now or hereafter
acquired, owned by or assigned to Apple and (ii) that cover subject
matter contained in the Original Code, but only to the extent
necessary to use, reproduce and/or distribute the Original Code
without infringement; and (b) in the case where You are the grantor of
rights, (i) claims of patents that are now or hereafter acquired,
owned by or assigned to You and (ii) that cover subject matter in Your
Modifications, taken alone or in combination with Original Code.
1.2 "Contributor" means any person or entity that creates or
contributes to the creation of Modifications.
1.3 "Covered Code" means the Original Code, Modifications, the
combination of Original Code and any Modifications, and/or any
respective portions thereof.
1.4 "Externally Deploy" means: (a) to sublicense, distribute or
otherwise make Covered Code available, directly or indirectly, to
anyone other than You; and/or (b) to use Covered Code, alone or as
part of a Larger Work, in any way to provide a service, including but
not limited to delivery of content, through electronic communication
with a client other than You.
1.5 "Larger Work" means a work which combines Covered Code or portions
thereof with code not governed by the terms of this License.
1.6 "Modifications" mean any addition to, deletion from, and/or change
to, the substance and/or structure of the Original Code, any previous
Modifications, the combination of Original Code and any previous
Modifications, and/or any respective portions thereof. When code is
released as a series of files, a Modification is: (a) any addition to
or deletion from the contents of a file containing Covered Code;
and/or (b) any new file or other representation of computer program
statements that contains any part of Covered Code.
1.7 "Original Code" means (a) the Source Code of a program or other
work as originally made available by Apple under this License,
including the Source Code of any updates or upgrades to such programs
or works made available by Apple under this License, and that has been
expressly identified by Apple as such in the header file(s) of such
work; and (b) the object code compiled from such Source Code and
originally made available by Apple under this License.
1.8 "Source Code" means the human readable form of a program or other
work that is suitable for making modifications to it, including all
modules it contains, plus any associated interface definition files,
scripts used to control compilation and installation of an executable
(object code).
1.9 "You" or "Your" means an individual or a legal entity exercising
rights under this License. For legal entities, "You" or "Your"
includes any entity which controls, is controlled by, or is under
common control with, You, where "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of fifty percent
(50%) or more of the outstanding shares or beneficial ownership of
such entity.
2. Permitted Uses; Conditions & Restrictions. Subject to the terms
and conditions of this License, Apple hereby grants You, effective on
the date You accept this License and download the Original Code, a
world-wide, royalty-free, non-exclusive license, to the extent of
Apple's Applicable Patent Rights and copyrights covering the Original
Code, to do the following:
2.1 Unmodified Code. You may use, reproduce, display, perform,
internally distribute within Your organization, and Externally Deploy
verbatim, unmodified copies of the Original Code, for commercial or
non-commercial purposes, provided that in each instance:
(a) You must retain and reproduce in all copies of Original Code the
copyright and other proprietary notices and disclaimers of Apple as
they appear in the Original Code, and keep intact all notices in the
Original Code that refer to this License; and
(b) You must include a copy of this License with every copy of Source
Code of Covered Code and documentation You distribute or Externally
Deploy, and You may not offer or impose any terms on such Source Code
that alter or restrict this License or the recipients' rights
hereunder, except as permitted under Section 6.
2.2 Modified Code. You may modify Covered Code and use, reproduce,
display, perform, internally distribute within Your organization, and
Externally Deploy Your Modifications and Covered Code, for commercial
or non-commercial purposes, provided that in each instance You also
meet all of these conditions:
(a) You must satisfy all the conditions of Section 2.1 with respect to
the Source Code of the Covered Code;
(b) You must duplicate, to the extent it does not already exist, the
notice in Exhibit A in each file of the Source Code of all Your
Modifications, and cause the modified files to carry prominent notices
stating that You changed the files and the date of any change; and
(c) If You Externally Deploy Your Modifications, You must make
Source Code of all Your Externally Deployed Modifications either
available to those to whom You have Externally Deployed Your
Modifications, or publicly available. Source Code of Your Externally
Deployed Modifications must be released under the terms set forth in
this License, including the license grants set forth in Section 3
below, for as long as you Externally Deploy the Covered Code or twelve
(12) months from the date of initial External Deployment, whichever is
longer. You should preferably distribute the Source Code of Your
Externally Deployed Modifications electronically (e.g. download from a
web site).
2.3 Distribution of Executable Versions. In addition, if You
Externally Deploy Covered Code (Original Code and/or Modifications) in
object code, executable form only, You must include a prominent
notice, in the code itself as well as in related documentation,
stating that Source Code of the Covered Code is available under the
terms of this License with information on how and where to obtain such
Source Code.
2.4 Third Party Rights. You expressly acknowledge and agree that
although Apple and each Contributor grants the licenses to their
respective portions of the Covered Code set forth herein, no
assurances are provided by Apple or any Contributor that the Covered
Code does not infringe the patent or other intellectual property
rights of any other entity. Apple and each Contributor disclaim any
liability to You for claims brought by any other entity based on
infringement of intellectual property rights or otherwise. As a
condition to exercising the rights and licenses granted hereunder, You
hereby assume sole responsibility to secure any other intellectual
property rights needed, if any. For example, if a third party patent
license is required to allow You to distribute the Covered Code, it is
Your responsibility to acquire that license before distributing the
Covered Code.
3. Your Grants. In consideration of, and as a condition to, the
licenses granted to You under this License, You hereby grant to any
person or entity receiving or distributing Covered Code under this
License a non-exclusive, royalty-free, perpetual, irrevocable license,
under Your Applicable Patent Rights and other intellectual property
rights (other than patent) owned or controlled by You, to use,
reproduce, display, perform, modify, sublicense, distribute and
Externally Deploy Your Modifications of the same scope and extent as
Apple's licenses under Sections 2.1 and 2.2 above.
4. Larger Works. You may create a Larger Work by combining Covered
Code with other code not governed by the terms of this License and
distribute the Larger Work as a single product. In each such instance,
You must make sure the requirements of this License are fulfilled for
the Covered Code or any portion thereof.
5. Limitations on Patent License. Except as expressly stated in
Section 2, no other patent rights, express or implied, are granted by
Apple herein. Modifications and/or Larger Works may require additional
patent licenses from Apple which Apple may grant in its sole
discretion.
6. Additional Terms. You may choose to offer, and to charge a fee for,
warranty, support, indemnity or liability obligations and/or other
rights consistent with the scope of the license granted herein
("Additional Terms") to one or more recipients of Covered Code.
However, You may do so only on Your own behalf and as Your sole
responsibility, and not on behalf of Apple or any Contributor. You
must obtain the recipient's agreement that any such Additional Terms
are offered by You alone, and You hereby agree to indemnify, defend
and hold Apple and every Contributor harmless for any liability
incurred by or claims asserted against Apple or such Contributor by
reason of any such Additional Terms.
7. Versions of the License. Apple may publish revised and/or new
versions of this License from time to time. Each version will be given
a distinguishing version number. Once Original Code has been published
under a particular version of this License, You may continue to use it
under the terms of that version. You may also choose to use such
Original Code under the terms of any subsequent version of this
License published by Apple. No one other than Apple has the right to
modify the terms applicable to Covered Code created under this
License.
8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in
part pre-release, untested, or not fully tested works. The Covered
Code may contain errors that could cause failures or loss of data, and
may be incomplete or contain inaccuracies. You expressly acknowledge
and agree that use of the Covered Code, or any portion thereof, is at
Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND
WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND
APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE
PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF
MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR
PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD
PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST
INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,
THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR
ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO
ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE
AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.
You acknowledge that the Covered Code is not intended for use in the
operation of nuclear facilities, aircraft navigation, communication
systems, or air traffic control machines in which case the failure of
the Covered Code could lead to death, personal injury, or severe
physical or environmental damage.
9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING
TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR
ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,
TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF
APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY
TO YOU. In no event shall Apple's total liability to You for all
damages (other than as may be required by applicable law) under this
License exceed the amount of fifty dollars ($50.00).
10. Trademarks. This License does not grant any rights to use the
trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",
"QuickTime", "QuickTime Streaming Server" or any other trademarks,
service marks, logos or trade names belonging to Apple (collectively
"Apple Marks") or to any trademark, service mark, logo or trade name
belonging to any Contributor. You agree not to use any Apple Marks in
or as part of the name of products derived from the Original Code or
to endorse or promote products derived from the Original Code other
than as expressly permitted by and in strict compliance at all times
with Apple's third party trademark usage guidelines which are posted
at http://www.apple.com/legal/guidelinesfor3rdparties.html.
11. Ownership. Subject to the licenses granted under this License,
each Contributor retains all rights, title and interest in and to any
Modifications made by such Contributor. Apple retains all rights,
title and interest in and to the Original Code and any Modifications
made by or on behalf of Apple ("Apple Modifications"), and such Apple
Modifications will not be automatically subject to this License. Apple
may, at its sole discretion, choose to license such Apple
Modifications under this License, or on different terms from those
contained in this License or may choose not to license them at all.
12. Termination.
12.1 Termination. This License and the rights granted hereunder will
terminate:
(a) automatically without notice from Apple if You fail to comply with
any term(s) of this License and fail to cure such breach within 30
days of becoming aware of such breach;
(b) immediately in the event of the circumstances described in Section
13.5(b); or
(c) automatically without notice from Apple if You, at any time during
the term of this License, commence an action for patent infringement
against Apple; provided that Apple did not first commence
an action for patent infringement against You in that instance.
12.2 Effect of Termination. Upon termination, You agree to immediately
stop any further use, reproduction, modification, sublicensing and
distribution of the Covered Code. All sublicenses to the Covered Code
which have been properly granted prior to termination shall survive
any termination of this License. Provisions which, by their nature,
should remain in effect beyond the termination of this License shall
survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,
12.2 and 13. No party will be liable to any other for compensation,
indemnity or damages of any sort solely as a result of terminating
this License in accordance with its terms, and termination of this
License will be without prejudice to any other right or remedy of
any party.
13. Miscellaneous.
13.1 Government End Users. The Covered Code is a "commercial item" as
defined in FAR 2.101. Government software and technical data rights in
the Covered Code include only those rights customarily provided to the
public as defined in this License. This customary commercial license
in technical data and software is provided in accordance with FAR
12.211 (Technical Data) and 12.212 (Computer Software) and, for
Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
Commercial Items) and 227.7202-3 (Rights in Commercial Computer
Software or Computer Software Documentation). Accordingly, all U.S.
Government End Users acquire Covered Code with only those rights set
forth herein.
13.2 Relationship of Parties. This License will not be construed as
creating an agency, partnership, joint venture or any other form of
legal association between or among You, Apple or any Contributor, and
You will not represent to the contrary, whether expressly, by
implication, appearance or otherwise.
13.3 Independent Development. Nothing in this License will impair
Apple's right to acquire, license, develop, have others develop for
it, market and/or distribute technology or products that perform the
same or similar functions as, or otherwise compete with,
Modifications, Larger Works, technology or products that You may
develop, produce, market or distribute.
13.4 Waiver; Construction. Failure by Apple or any Contributor to
enforce any provision of this License will not be deemed a waiver of
future enforcement of that or any other provision. Any law or
regulation which provides that the language of a contract shall be
construed against the drafter will not apply to this License.
13.5 Severability. (a) If for any reason a court of competent
jurisdiction finds any provision of this License, or portion thereof,
to be unenforceable, that provision of the License will be enforced to
the maximum extent permissible so as to effect the economic benefits
and intent of the parties, and the remainder of this License will
continue in full force and effect. (b) Notwithstanding the foregoing,
if applicable law prohibits or restricts You from fully and/or
specifically complying with Sections 2 and/or 3 or prevents the
enforceability of either of those Sections, this License will
immediately terminate and You must immediately discontinue any use of
the Covered Code and destroy all copies of it that are in your
possession or control.
13.6 Dispute Resolution. Any litigation or other dispute resolution
between You and Apple relating to this License shall take place in the
Northern District of California, and You and Apple hereby consent to
the personal jurisdiction of, and venue in, the state and federal
courts within that District with respect to this License. The
application of the United Nations Convention on Contracts for the
International Sale of Goods is expressly excluded.
13.7 Entire Agreement; Governing Law. This License constitutes the
entire agreement between the parties with respect to the subject
matter hereof. This License shall be governed by the laws of the
United States and the State of California, except that body of
California law concerning conflicts of law.
Where You are located in the province of Quebec, Canada, the following
clause applies: The parties hereby confirm that they have requested
that this License and all related documents be drafted in English. Les
parties ont exige que le present contrat et tous les documents
connexes soient rediges en anglais.
EXHIBIT A.
"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
Reserved.
This file contains Original Code and/or Modifications of Original Code
as defined in and that are subject to the Apple Public Source License
Version 2.0 (the 'License'). You may not use this file except in
compliance with the License. Please obtain a copy of the License at
http://www.opensource.apple.com/apsl/ and read it before using this
file.
The Original Code and all software distributed under the License are
distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
Please see the License for the specific language governing rights and
limitations under the License."
--- NEW FILE testcms.sh ---
#!/bin/sh
# usage: point LOCAL_BUILD_DIR to your build folder, insert a card
# and run this script
echo $PATH | fgrep -q "${LOCAL_BUILD_DIR}:" || PATH=${LOCAL_BUILD_DIR}:$PATH
SECURITY=`which security`
HOME=/tmp/test$$
export HOME
mkdir $HOME
cd $HOME
mkdir Library
mkdir Library/Preferences
mkdir Library/Keychains
echo Creating a login.keychain
$SECURITY create -p login login.keychain
echo "listing keychains"
$SECURITY list-keychains
echo "listing default keychain"
$SECURITY default-keychain
echo "Looking for the email address of the first certificate on the card"
if [ "x$EMAIL" == "x" ]; then
EMAIL=`$SECURITY find-certificate | awk -F = '/\"alis\"<blob>/ { addr=$2; gsub(/\"/, "", addr); print addr }'`
if [ "x$EMAIL" == "x" ]; then
echo "No certificate with an email address found."
exit 1
fi
fi
echo "Email addres found: <$EMAIL>"
echo "CONTENT: The secret and possibly signed content." > content.txt
echo "Creating a signed cms message."
$SECURITY cms -S -N "$EMAIL" -i content.txt -o signed.cms
echo "Verifying the signed cms message."
$SECURITY cms -D -i signed.cms -h0
echo "Creating an encrypted cms message."
$SECURITY cms -E -r "$EMAIL" -i content.txt -o encrypted.cms
echo "Decrypting the message."
$SECURITY cms -D -i encrypted.cms
#echo "Exporting the identity to pkcs12."
#$SECURITY export -f pkcs12 -t identities -p -P testcms -o identity.p12
# arch-tag: D00EE88A-08E5-11D9-B1C3-000A9595DEEE
--- NEW FILE testssl.sh ---
#!/bin/sh
SECURITY=${SECURITY:=security}
EMAIL=${EMAIL:=$USER@apple.com}
SSLVIEW=${SSLVIEW:=sslViewer}
SERVER=${SERVER:=hurljo3.apple.com}
HOME=/tmp/test$$
mkdir $HOME
cd $HOME
mkdir Library
mkdir Library/Preferences
mkdir Library/Keychains
echo Creating a login.keychain
$SECURITY create -p login login.keychain
echo "listing keychains"
$SECURITY list-keychains
echo "listing default keychain"
$SECURITY default-keychain
echo "CONTENT: The secret and possibly signed content." > content.txt
echo "Connecting to SSL Test server " $SERVER
$SSLVIEW $SERVER r c P=4443 V 3 a
# arch-tag: 51571215-09B6-11D9-8D4F-000A95C4302E
14 years
esc/mac/Tokend-35209/CoolKey/pkcs11 - New directory
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/CoolKey/pkcs11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16294/pkcs11
Log Message:
Directory /cvs/dirsec/esc/mac/Tokend-35209/CoolKey/pkcs11 added to the repository
14 years
esc/mac/Tokend-35209/CoolKey/mds - New directory
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/CoolKey/mds
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16257/mds
Log Message:
Directory /cvs/dirsec/esc/mac/Tokend-35209/CoolKey/mds added to the repository
14 years
esc/mac/Tokend-35209/CoolKey - New directory
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/CoolKey
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15190/CoolKey
Log Message:
Directory /cvs/dirsec/esc/mac/Tokend-35209/CoolKey added to the repository
14 years
esc/mac/Tokend-35209/Tokend.xcodeproj - New directory
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/Tokend.xcodeproj
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15190/Tokend.xcodeproj
Log Message:
Directory /cvs/dirsec/esc/mac/Tokend-35209/Tokend.xcodeproj added to the repository
14 years
esc/mac/Tokend-35209/Tokend - New directory
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/esc/mac/Tokend-35209/Tokend
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15190/Tokend
Log Message:
Directory /cvs/dirsec/esc/mac/Tokend-35209/Tokend added to the repository
14 years