add firefox extension template
This commit is contained in:
12
externs/webextension_polyfill/pkcs11/ModuleSlot.hx
Normal file
12
externs/webextension_polyfill/pkcs11/ModuleSlot.hx
Normal file
@@ -0,0 +1,12 @@
|
||||
package webextension_polyfill.pkcs11;
|
||||
|
||||
typedef ModuleSlot = {
|
||||
/**
|
||||
The name of the slot.
|
||||
**/
|
||||
var name : String;
|
||||
/**
|
||||
The token of the slot.
|
||||
**/
|
||||
var token : Null<Token>;
|
||||
};
|
20
externs/webextension_polyfill/pkcs11/Static.hx
Normal file
20
externs/webextension_polyfill/pkcs11/Static.hx
Normal file
@@ -0,0 +1,20 @@
|
||||
package webextension_polyfill.pkcs11;
|
||||
|
||||
typedef Static = {
|
||||
/**
|
||||
checks whether a PKCS#11 module, given by name, is installed
|
||||
**/
|
||||
function isModuleInstalled(name:String):js.lib.Promise<Bool>;
|
||||
/**
|
||||
Install a PKCS#11 module with a given name
|
||||
**/
|
||||
function installModule(name:String, ?flags:Float):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Remove an installed PKCS#11 module from firefox
|
||||
**/
|
||||
function uninstallModule(name:String):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Enumerate a module's slots, each with their name and whether a token is present
|
||||
**/
|
||||
function getModuleSlots(name:String):js.lib.Promise<Null<Any>>;
|
||||
};
|
28
externs/webextension_polyfill/pkcs11/Token.hx
Normal file
28
externs/webextension_polyfill/pkcs11/Token.hx
Normal file
@@ -0,0 +1,28 @@
|
||||
package webextension_polyfill.pkcs11;
|
||||
|
||||
typedef Token = {
|
||||
/**
|
||||
Name of the token.
|
||||
**/
|
||||
var name : String;
|
||||
/**
|
||||
Name of the token's manufacturer.
|
||||
**/
|
||||
var manufacturer : String;
|
||||
/**
|
||||
Hardware version, as a PKCS #11 version number (two 32-bit integers separated with a dot, like "1.0".
|
||||
**/
|
||||
var HWVersion : String;
|
||||
/**
|
||||
Firmware version, as a PKCS #11 version number (two 32-bit integers separated with a dot, like "1.0".
|
||||
**/
|
||||
var FWVersion : String;
|
||||
/**
|
||||
Serial number, whose format is defined by the token specification.
|
||||
**/
|
||||
var serial : String;
|
||||
/**
|
||||
true if the token is logged on already, false otherwise.
|
||||
**/
|
||||
var isLoggedIn : Bool;
|
||||
};
|
Reference in New Issue
Block a user