@Override public P11Module getP11Module(P11ModuleConf conf) throws P11TokenException { String type = conf.getType().toLowerCase(); String nativeLib = conf.getNativeLibrary(); String key = type + ":" + nativeLib; P11Module p11Module = modules.get(key); if (p11Module == null) { for (P11ModuleFactory service : factories) { if (service.canCreateModule(type)) { p11Module = service.newModule(conf); break; } } if (p11Module == null) { throw new P11TokenException( "could not find Factory to create PKCS#11 module of type '" + type + "'"); } modules.put(key, p11Module); } return p11Module; }
@Override public P11Module getP11Module(P11ModuleConf conf) throws P11TokenException { String type = conf.getType().toLowerCase(); String nativeLib = conf.getNativeLibrary(); String key = type + ":" + nativeLib; P11Module p11Module = modules.get(key); if (p11Module == null) { for (P11ModuleFactory service : services) { if (service.canCreateModule(type)) { p11Module = service.newModule(conf); break; } } if (p11Module == null) { throw new P11TokenException( "could not find Factory to create PKCS#11 module of type '" + type + "'"); } modules.put(key, p11Module); } return p11Module; }
String modulePath = moduleConf.getNativeLibrary().trim(); String parametersStr = ""; if (!modulePath.isEmpty()) {
@Override public void close() { for (P11SlotIdentifier slotId : getSlotIds()) { try { getSlot(slotId).close(); } catch (Throwable th) { LogUtil.error(LOG, th, "could not close PKCS#11 slot " + slotId); } } close(conf.getNativeLibrary(), module); }
private ProxyP11Module(P11ModuleConf moduleConf) throws P11TokenException { super(moduleConf); final String modulePath = moduleConf.getNativeLibrary();
this.module = Args.notNull(module, "module"); String library = moduleConf.getNativeLibrary(); Vendor vendor; if (library.contains("ykcs11")) { "\n\tPath", moduleConf.getNativeLibrary());
module = Module.getInstance(moduleConf.getNativeLibrary()); } catch (IOException ex) { final String msg = "could not load the PKCS#11 module " + moduleConf.getName();