Reputation: 101
I'm working with smart cards in C# using the Subsembly SmartCard API.
Are there any APDU commands(or otherwise) to see either the size of a DF on the card? Or to see a list of the EF contained within a DF?
Upvotes: 2
Views: 533
Reputation: 5333
1) Size of a DF; as pointed out earlier, the meaning is OS manufacturer dependent (ranging from 'not available at all' over 'used for OS-specific stuff' to 'limiting the size of all child EFs/DFs' in the quota sense). If it is useful for the OS in question, there is a chance, to find it in data object 0x81 in the file control information returned by SELECT.
2) files within DF: PCSC specifies in part 6 the method FILEACCESS:DIRECTORY for that purpose. Very early versions of that part also defined an APDU CLA=0x80, INS=016, which can be tried if the card service provider approach fails.
Upvotes: 0
Reputation: 94038
A DF does not have a size, and may not just consist of files. There is no standardized way of requesting the list of files at the APDU level. To see what's on a file based smart card, the ISO 7816-15 standard is commonly used (which is based on the publicly available PKCS#15 standard).
Upvotes: 1