www.Linux-Support.com

  • Increase font size
  • Default font size
  • Decrease font size
Home

Knopflerfish OSGi and KeyStores

Print
Article Index
1. Knopflerfish
2. Configuration
2.1. ...via Knopflerfish
2.2. ...via JVM

osgi-broomWhen running applications within the OSGi framework Knopflerfish you might have problems when trying to utilize custom key stores or trust stores.

This article shows you how to setup your runtime environment to master this task successfully.

1. Knopflerfish

...comes with a bundle of configuration files and contains a build-in support for handling key stores and trust stores. To enable your application or plugin to run in an properly setup environment you have got the following options:

  • load the desired key stores at runtime - this requires some additional lines of Java source code
  • utilize the configuration options of the Knopflerfish framework
  • configure key stores when starting the Java Virtual Machine (JVM)

2. Configuration

In this article we will concentrate on customizing configuration files, only. Your JVM and Knopflerfish come with a build-in support for key stroes and trust stores. So we do not try to reinvent the wheel. So we will describe how to solve problems by modifying properties of configuration files or startup parameters of the JVM.

2.1. ...via Knopflerfish

The Knopflerfish OSGi framework contains a configation file named props_osgi.xargs. Customize the following lines within that file to attach key stores successfully at start-up time.

[...]
 -Djavax.net.ssl.trustStore=mykeystore
-Djavax.net.ssl.trustStorePassword=passwd
[...]
 

2.2. ...via JVM

When you are willing to configure the key stores to be used when starting the JVM your have to comment out the previously mentioned configuration parameters.

[...]
 #-Djavax.net.ssl.trustStore=mykeystore
#-Djavax.net.ssl.trustStorePassword=passwd
[...]

Then your plugins will utilize the key store you did configure by following the steps described in article Custom SSL Certificates and HTTPs with Java Clients.

Related articles:

Last Updated on Wednesday, 25 August 2010 11:33