The iso7816 emulator provides a set of ISO 7816-4 functions that can be used within a Tcl script. Several non-standard commands have been added to this suite to overcome shortcomings in the standard.
Generic ISO 7816 commands
|
Function |
Description |
Tcl Usage |
Args |
|
Append Record |
Append to a record file |
iso7816::appendRecord |
|
|
Envelope |
Provide secure messaging to the smartcard |
iso7816::envelope |
|
|
Erase Binary |
Erase bytes in a transparent file |
iso7816::eraseBinary offset len |
offset - starting offset |
|
External Authenticate |
Authenticate the smartcard application |
iso7816::externalAuthenticate |
|
|
Get Challenge |
Generate a random challenge |
iso7816::getChallenge |
|
|
Get Data |
Retrieve a data object |
iso7816::getData |
|
|
Get Response |
Retrieve waiting data from the smartcard |
iso7816::getResponse |
|
|
Internal Authenticate |
Prove that the smartcard has a secret key |
iso7816::internalAuthenticate |
|
|
Manage Channel |
Open/Close a logical connection to a smartcard |
iso7816::manageChannel |
|
|
Put Data |
Write a data object |
iso7816::putData |
|
|
Read Binary |
Read data from a transparent file |
iso7816::readBinary offset len data |
offset - starting offset |
|
Read Record |
Read from a record file |
iso7816::readRecord |
|
|
Select File |
Select a file for subsequent file operations. |
iso7816::selectFile fileID |
fileID - the numeric fileID |
|
Update Binary |
Update data in a transparent file |
iso7816::updateBinary offset len data |
offset - starting offset |
|
Update Record |
Update within a record file |
iso7816::updateRecord |
|
|
Verify |
Check for a match of password type info |
iso7816::verify |
|
|
Write Binary |
Write data to a transparent file |
iso7816::writeBinary offset len data |
offset - starting offset |
|
Write Record |
Write to a record file |
iso7816::writeRecord |
|
Extended ISO7816 commands
|
Function |
Description |
Tcl Usage |
Args |
|
Create Directory |
Create a directory |
iso7816::createDir fileID | name |
fileID - file ID of the subdirectory or a name |
|
Create File |
create a file in a directory |
iso7816::createFile fileID | name |
fileID - fileID or name of the file to create |
|
Change Mode |
Set the protection mode of a file or directory |
iso7816::chmod fileID prot |
|
|
Directory List |
List the contents of the currently selected directory |
iso7816::ls |
|
|
File Name To ID |
Convert a filename to a file ID |
iso7816::fileNameToID name |
|