public void addHooks(HookRegistry hookRegistry) { container = hookRegistry.getContainer(); hookRegistry.addActivatorHookFactory(this); String[] support = ManifestElement.getArrayFromList(hookRegistry.getConfiguration().getConfiguration(SIGNED_CONTENT_SUPPORT, hookRegistry.getConfiguration().getConfiguration(SIGNED_BUNDLE_SUPPORT)), ","); //$NON-NLS-1$ for (int i = 0; i < support.length; i++) { if (SUPPORT_CERTIFICATE.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE; else if (SUPPORT_TRUST.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_TRUST; else if (SUPPORT_RUNTIME.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_RUNTIME; else if (SUPPORT_TRUE.equals(support[i]) || SUPPORT_ALL.equals(support[i])) supportSignedBundles |= VERIFY_ALL; } trustEngineNameProp = hookRegistry.getConfiguration().getConfiguration(SignedContentConstants.TRUST_ENGINE); if ((supportSignedBundles & VERIFY_CERTIFICATE) != 0) { hookRegistry.addStorageHookFactory(new SignedStorageHook()); hookRegistry.addBundleFileWrapperFactoryHook(this); } }
public void addHooks(HookRegistry hookRegistry) { container = hookRegistry.getContainer(); hookRegistry.addActivatorHookFactory(this); String[] support = ManifestElement.getArrayFromList(hookRegistry.getConfiguration().getConfiguration(SIGNED_CONTENT_SUPPORT, hookRegistry.getConfiguration().getConfiguration(SIGNED_BUNDLE_SUPPORT)), ","); //$NON-NLS-1$ for (int i = 0; i < support.length; i++) { if (SUPPORT_CERTIFICATE.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE; else if (SUPPORT_TRUST.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_TRUST; else if (SUPPORT_RUNTIME.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_RUNTIME; else if (SUPPORT_TRUE.equals(support[i]) || SUPPORT_ALL.equals(support[i])) supportSignedBundles |= VERIFY_ALL; } trustEngineNameProp = hookRegistry.getConfiguration().getConfiguration(SignedContentConstants.TRUST_ENGINE); if ((supportSignedBundles & VERIFY_CERTIFICATE) != 0) { hookRegistry.addStorageHookFactory(new SignedStorageHook()); hookRegistry.addBundleFileWrapperFactoryHook(this); } }
public void addHooks(HookRegistry hookRegistry) { container = hookRegistry.getContainer(); hookRegistry.addActivatorHookFactory(this); String[] support = ManifestElement.getArrayFromList(hookRegistry.getConfiguration().getConfiguration(SIGNED_CONTENT_SUPPORT, hookRegistry.getConfiguration().getConfiguration(SIGNED_BUNDLE_SUPPORT)), ","); //$NON-NLS-1$ for (int i = 0; i < support.length; i++) { if (SUPPORT_CERTIFICATE.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE; else if (SUPPORT_TRUST.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_TRUST; else if (SUPPORT_RUNTIME.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_RUNTIME; else if (SUPPORT_TRUE.equals(support[i]) || SUPPORT_ALL.equals(support[i])) supportSignedBundles |= VERIFY_ALL; } trustEngineNameProp = hookRegistry.getConfiguration().getConfiguration(SignedContentConstants.TRUST_ENGINE); if ((supportSignedBundles & VERIFY_CERTIFICATE) != 0) { hookRegistry.addStorageHookFactory(new SignedStorageHook()); hookRegistry.addBundleFileWrapperFactoryHook(this); } }
public void addHooks(HookRegistry hookRegistry) { container = hookRegistry.getContainer(); hookRegistry.addActivatorHookFactory(this); String[] support = ManifestElement.getArrayFromList(hookRegistry.getConfiguration().getConfiguration(SIGNED_CONTENT_SUPPORT, hookRegistry.getConfiguration().getConfiguration(SIGNED_BUNDLE_SUPPORT)), ","); //$NON-NLS-1$ for (int i = 0; i < support.length; i++) { if (SUPPORT_CERTIFICATE.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE; else if (SUPPORT_TRUST.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_TRUST; else if (SUPPORT_RUNTIME.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_RUNTIME; else if (SUPPORT_TRUE.equals(support[i]) || SUPPORT_ALL.equals(support[i])) supportSignedBundles |= VERIFY_ALL; } trustEngineNameProp = hookRegistry.getConfiguration().getConfiguration(SignedContentConstants.TRUST_ENGINE); if ((supportSignedBundles & VERIFY_CERTIFICATE) != 0) { hookRegistry.addStorageHookFactory(new SignedStorageHook()); hookRegistry.addBundleFileWrapperFactoryHook(this); } }
public void addHooks(HookRegistry hookRegistry) { container = hookRegistry.getContainer(); hookRegistry.addActivatorHookFactory(this); String[] support = ManifestElement.getArrayFromList(hookRegistry.getConfiguration().getConfiguration(SIGNED_CONTENT_SUPPORT, hookRegistry.getConfiguration().getConfiguration(SIGNED_BUNDLE_SUPPORT)), ","); //$NON-NLS-1$ for (int i = 0; i < support.length; i++) { if (SUPPORT_CERTIFICATE.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE; else if (SUPPORT_TRUST.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_TRUST; else if (SUPPORT_RUNTIME.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_RUNTIME; else if (SUPPORT_TRUE.equals(support[i]) || SUPPORT_ALL.equals(support[i])) supportSignedBundles |= VERIFY_ALL; } trustEngineNameProp = hookRegistry.getConfiguration().getConfiguration(SignedContentConstants.TRUST_ENGINE); if ((supportSignedBundles & VERIFY_CERTIFICATE) != 0) { hookRegistry.addStorageHookFactory(new SignedStorageHook()); hookRegistry.addBundleFileWrapperFactoryHook(this); } }
public void addHooks(HookRegistry hookRegistry) { container = hookRegistry.getContainer(); hookRegistry.addActivatorHookFactory(this); String[] support = ManifestElement.getArrayFromList(hookRegistry.getConfiguration().getConfiguration(SIGNED_CONTENT_SUPPORT, hookRegistry.getConfiguration().getConfiguration(SIGNED_BUNDLE_SUPPORT)), ","); //$NON-NLS-1$ for (int i = 0; i < support.length; i++) { if (SUPPORT_CERTIFICATE.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE; else if (SUPPORT_TRUST.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_TRUST; else if (SUPPORT_RUNTIME.equals(support[i])) supportSignedBundles |= VERIFY_CERTIFICATE | VERIFY_RUNTIME; else if (SUPPORT_TRUE.equals(support[i]) || SUPPORT_ALL.equals(support[i])) supportSignedBundles |= VERIFY_ALL; } trustEngineNameProp = hookRegistry.getConfiguration().getConfiguration(SignedContentConstants.TRUST_ENGINE); if ((supportSignedBundles & VERIFY_CERTIFICATE) != 0) { hookRegistry.addStorageHookFactory(new SignedStorageHook()); hookRegistry.addBundleFileWrapperFactoryHook(this); } }
public void addHooks(HookRegistry hookRegistry) { boolean disableCDS = Boolean.valueOf(hookRegistry.getConfiguration().getProperty(DISABLE_CDS)); if (disableCDS) { return; } // check for the external com.ibm.cds system.bundle fragment try { Class.forName(OLD_CDS_CONFIGURATOR); // the old com.ibm.cds fragment is installed; disable build-in one return; } catch (ClassNotFoundException e) { // expected } try { Class.forName(J9_SHARED_CLASS_HELPER_CLASS); } catch (ClassNotFoundException e) { boolean reportErrors = Boolean.valueOf(hookRegistry.getConfiguration().getProperty(REPORT_ERRORS)); // not running on J9 if (reportErrors) { EquinoxContainer container = hookRegistry.getContainer(); EquinoxLogServices logServices = container.getLogServices(); logServices.log(EquinoxContainer.NAME, FrameworkLogEntry.WARNING, "The J9 Class Sharing Adaptor will not work in this configuration. You are not running on a J9 Java VM.", null); //$NON-NLS-1$ } return; } new CDSHookImpls().registerHooks(hookRegistry); }