[ https://issues.apache.org/jira/browse/FELIX-6194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16955922#comment-16955922 ]
vato edited comment on FELIX-6194 at 10/21/19 9:58 AM: ------------------------------------------------------- Hi [~cziegeler] Thanks but still it didn't work for me. My ConfigurationAdmin doesn't return any configuration for PID "org.apache.felix.http". I created one instead but it didn't reload jetty, nothing changed. See my example {code:java} Configuration c2 = cm.createFactoryConfiguration("org.apache.felix.http"); Dictionary<String, Object> newProps2 = new Hashtable<>(); newProps2.put("org.apache.felix.https.enable", true); newProps2.put("org.apache.felix.https.keystore", keystorePath); newProps2.put("org.apache.felix.https.keystore.password", keyStorePass); newProps2.put("org.apache.felix.https.keystore.key.password", keyPass); c2.update(newProps2); Configuration[] configs = cm.listConfigurations(null); for(Configuration c : configs) { System.out.println(c.getPid()); Dictionary<String, Object> newProps = c.getProperties(); Enumeration<String> keys = newProps.keys(); while (keys.hasMoreElements()) { Object k = keys.nextElement(); System.out.println("\t" + k + ": " + newProps.get(k)); } }{code} And this is the log output {code:java} org.apache.felix.http._0 org.apache.felix.https.keystore.password: keypass service.factoryPid: org.apache.felix.http org.apache.felix.https.enable: true service.pid: org.apache.felix.http._0 org.apache.felix.https.keystore.key.password: keypass org.apache.felix.https.keystore: C:/Users/vato/Desktop/test_ssl/dummy-keystore.jks com.eclipsesource.jaxrs.connector root: /rest service.pid: com.eclipsesource.jaxrs.connector {code} That's the whole list of configurations, obviously the System.properties don't mix with OSGI configuration. was (Author: vato): Hi [~cziegeler] Thanks but still it didn't work for me. My ConfigurationAdmin doesn't return any configuration for PID "org.apache.felix.http". I created one instead but it didn't reload jetty, nothing changed. See my example {code:java} Configuration c2 = cm.createFactoryConfiguration("org.apache.felix.http"); Dictionary<String, Object> newProps2 = new Hashtable<>(); newProps2.put("org.apache.felix.https.enable", true); newProps2.put("org.apache.felix.https.keystore", keystorePath); newProps2.put("org.apache.felix.https.keystore.password", keyStorePass); newProps2.put("org.apache.felix.https.keystore.key.password", keyPass); c2.update(newProps2); Configuration[] configs = cm.listConfigurations(null)for(Configuration c : configs) { System.out.println(c.getPid()); Dictionary<String, Object> newProps = c.getProperties(); Enumeration<String> keys = newProps.keys(); while (keys.hasMoreElements()) { Object k = keys.nextElement(); System.out.println("\t" + k + ": " + newProps.get(k)); } }{code} And this is the log output {code:java} org.apache.felix.http._0 org.apache.felix.https.keystore.password: keypass service.factoryPid: org.apache.felix.http org.apache.felix.https.enable: true service.pid: org.apache.felix.http._0 org.apache.felix.https.keystore.key.password: keypass org.apache.felix.https.keystore: C:/Users/vato/Desktop/test_ssl/dummy-keystore.jks com.eclipsesource.jaxrs.connector root: /rest service.pid: com.eclipsesource.jaxrs.connector {code} > Get the SslContextFactory from Jetty > ------------------------------------ > > Key: FELIX-6194 > URL: https://issues.apache.org/jira/browse/FELIX-6194 > Project: Felix > Issue Type: Wish > Affects Versions: http.jetty-4.0.14 > Environment: Java 8 > Reporter: vato > Priority: Critical > Labels: features > > Hi, > I would like to reload my keystore using > [SslContextFactory|https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/util/ssl/SslContextFactory.html#reload(java.util.function.Consumer)] > however I'm not able to get it from the bundle. I need to do this in runtime > and updating the bundle properties affects the whole server which is not a > good option for me. > Please see this stackoverflow issue for more details > [https://stackoverflow.com/questions/58260745/setting-ssl-keystore-at-runtime-in-apache-felix] > Thanks in advance! -- This message was sent by Atlassian Jira (v8.3.4#803005)