GlobalPlatform / WebApis-for-SE

Open source Apis to access a Secure Element from a Web application
Apache License 2.0
18 stars 5 forks source link

Reset of physical interface #17

Closed serianox closed 8 years ago

serianox commented 8 years ago

It is useful or mandatory in some cases to be able to reset the physical interface of a Secure Element. This allows for instance to clear the status of global objects on the Secure Element, such as the Global PIN, or to access objects that are only available after card initialization such as the initial data string.

This physical interface reset is partially defined in section 5.1 Conditions of operation of ISO 7816-4:2013. The exact meaning is defined by the interface protocol. E.g. for ISO 7816-4, cold reset and warm reset are defined, whereas ISO 14443-3 defines the ACTIVE* state.

A method to perform the physical interface reset should be added to the reader interface. Also, it should be noted that some Secure Element may not be reset, e.g. UICC.

interface Reader {
    readonly attribute boolean           isSEPresent;
    readonly attribute DOMString         name;
    readonly attribute SecureElementType secureElementType;
    readonly attribute boolean           isRemovable;
    Promise<Session> openSession();
    Promise<void>    closeSessions();
    Promise<void>    reset();
};
opoto commented 8 years ago

Yes, this looks like a good improvement. We'll review it during our next call (July 21)