Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class PKCS15

    Object
       |
       +--PKCS15

class PKCS15

This class provides for direct access to a PKCS#15 data structure on a card.

The calling application will typically use:

     var card = new Card(_scsh3.reader);
     var p15 = new PKCS15(card);
     var appllist = p15.readApplicationDirectory();
     var aid;
     for (var i in appllist) {
       print(i);
       aid = i;
     }
     var at = appllist[aid];
     p15.readObjectListForApplication(at);
     for (var i = 0; i < at.objlist.length; i++) {
       print(at.objlist[i]);
     }

Defined in p15classes.js

Field Summary
`Object` | `card`

Constructor Summary
`PKCS15(<Card> card)` Create an object to access the PKCS#15 structure on a card.

Method Summary
`PKCS15_ApplicationTemplate[]` | `getAidList()` Return the hash table of application templates
`PKCS15_CIAInfo` | `getCIAInfo(<PKCS15_Path> path)` Reads and return the CIAInfo structure referenced by the PKCS#15 path element.
`PKCS15_ApplicationTemplate[]` | `readApplicationDirectory()` Reads the application directory from EF_DIR.
`ASN1[]` | `readCardObjects(<String> df, <PKCS15_Path> path)` Reads PKCS#15 objects from card file which can be either transparent or record oriented.
`void` | `readObjectListForApplication(<PKCS15_ApplicationTemplate> at)` Reads all CIO objects for an application and adds the CIO objects to the objlist property
`<static> ASN1[]` | `parseObjectList(<ByteString> data)` Parse a list of TLV objects

Field Detail

### card

    Object card

Constructor Detail

### PKCS15

    PKCS15(<Card> card)

Create an object to access the PKCS#15 structure on a card.

Parameters:

`card` - the card object to use for card access.

Method Detail

### getAidList

    PKCS15_ApplicationTemplate[] getAidList()

Return the hash table of application templates

Returns:

the hash table of application templates

### getCIAInfo

    PKCS15_CIAInfo getCIAInfo(<PKCS15_Path> path)

Reads and return the CIAInfo structure referenced by the PKCS#15 path element.

Parameters:

`path` - the path to the CIAInfo file

Returns:

the CIAInfo description

### readApplicationDirectory

    PKCS15_ApplicationTemplate[] readApplicationDirectory()

Reads the application directory from EF_DIR.

The method supports linear variable and transparent EFs. It creates an internal table of of applications.

Returns:

hash table of application templates index by application identifier

### readCardObjects

    ASN1[] readCardObjects(<String> df, <PKCS15_Path> path)

Reads PKCS#15 objects from card file which can be either transparent or record oriented.

Parameters:

`df` - the current DF in OCF path notation.

`path` - the relative or absolute path to the EF

Returns:

the array of TLV objects read from the file

### readObjectListForApplication

    void readObjectListForApplication(<PKCS15_ApplicationTemplate> at)

Reads all CIO objects for an application and adds the CIO objects to the objlist property

Parameters:

`at` - the application template

### parseObjectList

    <static> ASN1[] parseObjectList(<ByteString> data)

Parse a list of TLV objects

Parameters:

`data` - the binary data with TLV objects

Returns:

the list of ASN1 objects

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Wed Jan 14 16:42:14 2026