Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

An OSGi bundle which reports on the status of the bundle's jar signing information upon launch.

License

Notifications You must be signed in to change notification settings

preemptive/OSGiSigningCheck

Repository files navigation

OSGiSigningCheck

An OSGi bundle which reports on the status of the bundle's jar signing information upon launch. Compiling and installing this bundle will inform you if your OSGi configuration ignores or supports signed bundles.

Building

Simply run gradlew. It will download any files necessary, compile the bundle, and sign it. You can also use the prebuilt jar.

##Deploying Install the compiled jar (build/libs/SignedOSGiExample-1.0.jar), or the prebuilt one, to your OSGi system and start the bundle. The console will report if the bundle is still signed.

Signed Output

Starting SignedOSGiExample...
SignedOSGiExample was loaded by {an OSGi implementation specific ClassLoader}.
Checking certificates...
There is 1 certificate in {the URL location of the bundle}.
Certificate Principal: CN=Example Alias, OU=Development, O=PreEmptive Solutions, L=Mayfield Village, ST=OH, C=US
SignedOSGiExample is still signed.

Unsigned Output

Starting SignedOSGiExample...
SignedOSGiExample was loaded by {an OSGi implementation specific ClassLoader}.
Checking certificates...
There are 0 certificates in {the URL location of the bundle}.
SignedOSGiExample is no longer signed.

##Equinox Settings Out of the box, the Equinox implementation will not load the certificates. To run with Equinox, pass -Dosgi.signedcontent.support=certificate when launching. If that does not work, make sure you are not passing -Dosgi.support.class.certificate=false. See http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html for more details.

To verify the settings are properly incorporated, modify src/main/java/com/preEmptive/example/signedOSGi/SignedActivator.java and set printEquinoxProperties to true. Then recompile and install.

##Felix Settings Out of the box, the Felix implementation will not load the certificates. To run with Felix, install the org.apache.felix.framework.security bundle and pass -Djava.security.policy={sample directory}/all.policy, -Dorg.osgi.framework.security="osgi", and -Dorg.osgi.framework.trust.repositories={sample directory}/certs.ks when launching. See http://felix.apache.org/site/apache-felix-framework-security.html for additional details.

To verify the settings are properly incorporated, modify src/main/java/com/preEmptive/example/signedOSGi/SignedActivator.java and set printFelixProperties to true. Then recompile and install.

About

An OSGi bundle which reports on the status of the bundle's jar signing information upon launch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages