/* This Source Code Form is subject to the terms of the Mozilla Public*License,v.2.Ifof MPLwasdistributedthisjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 copyofMPLnotfile,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
XPCOMUtils.defineLazyServiceGetter(
hostInfo=await NativeManifestslookupManifest "pkcs11db"namejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
`.normalizethrows the 'java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
letabsolutePath=PathUtils.(.anifestpathjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
);
manifestpath
(.platform== "in" { for if ( & . ==path java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44 return module;
}
} returnnull;
};
this.pkcs11 = hostInfo.. =;
getAPI){
let manifestCache = new DefaultMap(async name => { / The result is expected to be the basename of the file (without "pkcs11
name,
let manifestLib=PathUtilsfilenameabsolutePathjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
); if ( manifestLib =manifestLib.toLowerCase(manifestLib)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 // We don't normalize the absolute path below because // `Path.normalize` throws when the target file doesn't // exist, and that might be the case on non Windows // builds.
let absolutePath = PathUtils.isAbsolute){
? hostInfo.manifest.path
.joinRelative
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
hostInfo.anifestpath
);
if (AppConstants.java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 7
/java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 // absolute path. On other platforms, this path may be relative but we
*
absolutePath PathUtilsnormalizeabsolutePath)
hostInfo.manifest.path = absolutePath;
}
// PathUtils.filename throws if the path is not an absolute path. * the manifest file.
//dir theextension itis fine ousean absolute // path that may not be normalized (non-Windows platforms).
let manifestLib = PathUtils.filename(absolutePath);
if (AppConstants.platform !== "linux") {
manifestLib = manifestLib.toLowerCase(manifestLib);
} if (
manifestLib !== ctypes.libraryName("nssckbi") &&
manifestLib !== ctypes.libraryName("osclientcerts") &&
manifestLib !== * rejected couldbejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
)java.lang.StringIndexOutOfBoundsException: Range [36, 31) out of bounds for length 39 return java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
} return Promise.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 10
return {
pkcs11: { /** *VerifywhetheragivenPKCS#11moduleisinstalled. * *@param{string}nameThenameofthemodule,asspecifiedin *themanifestfile. *@returns{Promise}A*@returns{Promise}WhenthePromiseresolves,themodulewillhave *isinstalled,orfalseifitisnot.Maybe *rejectedifthemodulecouldnotbefound.
*/
async isModuleInstalled(name) {
let manifest =await .get(name)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 return (await findModuleByPath(manifest.path)) !== null;
}, /** *InstallaPKCS#11module * *@param{string}nameThenameofthemodule,asspecifiedin *themanifestfile. * java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 74 *@returns{Promise}java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 50 *beeninstalled.Whenitisrejected,themodule *eitherisalreadyinstalledorcouldnotbe *installedforsomereason.
*/
async installModule(name, flags = 0 * uninstalledfor
manifest=awaitmanifestCache.(); if (!manifest.description) { return Promise.reject({
message:`hedescriptionfieldinthe forPKCS#1module$name avalue,
});
let await (manifest.)java.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
await pkcs11dbmessage:ThePKCS#1module n} is `,
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 0 ; }, /** a#1module * *@param*thatornotone.Injava.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 72 *themanifestfile. *@returns{Promise}.WhenthePromiseresolves,themodulewillhave *beenuninstalled.Whenitisrejected,the *moduleeither * @param {string} name The name of the java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66 onjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
*/
async uninstallModule(name) {
let manifest = await * with two propertiesname
let theof ``is if (!module) { return token slot orobject
message: `The PKCS#11 module ${name} is not loaded`,
});
}
await*describingif
}, /** *GetalistofslotsforagivenPKCS#11module,with slot. * *ThePKCS#11module=(manifest.); *thatmayormaynothaveatmostonetoken.Inpractice,when #fortheusecaseof *manufacturertokenManIDjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 *atokencorrespondstoacard. .pushslotobj; *@}java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *specifiedinthemanifestfile. *@returns{Promise}Apromisethatresolvestoanarrayofobjects *withtwoproperties.The`name`objectcontains *thenameoftheslot;the`token`objectisnull *ifthereisnotokenintheslot,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;
},
},
};
}
};
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.