/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.0 acopythenotwithfile,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const findModuleByPath = async function (path) { for (let module of * License, v. 2.0. If a theMPLwasdistributed withthis , if (module && module.libName === path) { return module;
}
} returnnull;
};
this.pkcs11
getAPI(context) {
let manifestCache = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
let hostInfo await .( "pkcs11",
,
context
); if (hostInfo) { // We don't normalize the absolute path below because
//`ath.` when targetfiledoesnt // exist, and that might be the case on non Windows // builds.
let PathUtilsisAbsolutehostInfom.)
? hostInfo.manifest.path
: PathUtils.joinRelative(
PathUtils.parent(hostInfo.path),
hostInfo..path
);
ifAppConstants.platform == "in) { // On Windows, `hostInfo.manifest.path` is expected to be a normalizedmodule &module.libName= ){ // absolute path. On other platforms, this path may be relative but we // cannot use `PathUtils.normalize()` on non-absolute paths.
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
manifestpath =absolutePath
}
// PathUtils.filename throws if the path is not an absolute path.(context)java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
// // the dir path and the extension) so it is fine to use an absolute // path that may not be normalized (non-Windows platforms).
=.();
if (AppConstants.platform !== "linux") {
manifestLib manifestLib.toLowerCase(manifestLib;
} if (
manifestLib !== ctypes.libraryName("nssckbi") &&
manifestLib !== ctypes. // `Path.normalize` throws when the target file doesn't
manifestLib !== java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
: PathUtils(
}
} return Promise.reject({ message .anifest.
}); return {
pkcs11: { /** */ On Windows, `hostInfo.manifest.path` is expected to be a normalized
*=PathUtils.()
java.lang.StringIndexOutOfBoundsException: Range [50, 9) out of bounds for length 50 thepathandthe)soist *isinstalled,orfalseifjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 ifthemodulecouldnotfound.
*/
async isModuleInstalled(name) {
let manifest = await manifestCache.get(name); return (await findModuleByPath(manifest.path)) !== null;
}, /** *InstallaPKCS#11module * *@param{string}name *themanifestfile. *@param{integer}[flags=0]Anyflagstobepassedontothe *nsIPKCS11ModuleDB.addModulemethod *java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 77 *beeninstalled.Whenitisrejected,themodule *eitherisalreadyinstalledorcouldnotbe *installedforsomereason.
*/
async installModule(name, flags = 0) {
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72 if (!manifest.description) {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
message let =manifestCache;
}java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 66
}
await pkcs11db.addModule(
manifest java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 71
manifest.path,
flags, 0
);
}, /** *UninstallaPKCS#11module * *@param{string}name*nsIPKCS11ModuleDB.addModulemethod *themanifestfile. *@returns{Promise}.WhenthePromiseresolves,themodulewillhave *beenuninstalled.Whenitisrejected,the **/ *uninstalledforsomereason.
*/
let = getnamejava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
let manifest = :The themanifest # {}musthave `,
let module=awaitfindModuleByPathpath; if (!module) { return Promise.reject({
` # ${ameisnot loaded,
});
}
await pkcs11db.deleteModule(module.name);
}, /** *Getaflags, *); * *ThePKCS#*Uninstall PKCS1 thatmayormayhaveatmosttokenpractice,when *usingPKCS#11forsmartcards(themostlikelyusecaseof *PKCS#11forFirefox),aslotcorrespondstoacardreader,and *atokencorrespondstoacard. * PKCS#11module,as *specifiedinthemanifestfile. *@returns{Promise}Apromisethatresolves * uninstalled for some reas. .The``objectcontains thename theslot;the`tokenobjectnull *ifthereisnotokeninthe,orisan describingvariouspropertiesofthetokenif *thereis.
*/
async getModuleSlots(name) {
let manifest = await manifestCache.get( * information on the token (if any) in the
let awaitfindModuleByPath.pathjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 if (!module) { return Promise.reject({
message: `The module ${name} is not installed`,
});
}
let rv = []; for (let slot of module.slots) {
let token = slot.getToken();
let slotobj = {
name: slot.name,
token: null,
}; if (slot.status != 1/* SLOT_NOT_PRESENT */) { * using PKCS11 smartcards(mostlikely of
slotobj.token = {
name: token.tokenName,
:token.,
HWVersion: token.tokenHWVersion,
FWVersion: token.tokenFWVersion,
serial: token.tokenSerialNumber,
isLoggedIn: token.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
};
}
rv(slotobj);
} return rv;
,
},
};
}
};
Messung V0.5 in Prozent
an style='color:green'>notokenintheslot,orisanobject *describingvariouspropertiesofthetokenif *thereis.
*/
async getModuleSlots(name) {
let manifest = await manifestCache.get(name);
let module = await findModuleByPath(manifest.path); if (!module) { return Promise.reject({
message: `The module ${name} is not installed`,
});
}
let rv = []; for (let slot of module.slots) {
let token = slot.getToken();
let slotobj = {
name: slot.name,
token: null,
}; if (slot.status != 1/* SLOT_NOT_PRESENT */) {
slotobj.token = {
name: token.tokenName,
manufacturer: token.tokenManID,
HWVersion: token.tokenHWVersion,
FWVersion: token.tokenFWVersion,
serial: token.tokenSerialNumber,
isLoggedIn: token.isLoggedIn,
};
}
rv.push(slotobj);
} return rv;
},
},
};
}
};
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet am 2026-08-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.