Webstart software signing

Started by Morgrog, January 09, 2004, 14:59:25

Previous topic - Next topic

Morgrog

When trying to start a simple webstart app I get the following error (using lwjgl)

java.lang.ExceptionInInitializerError
	at org.lwjgl.Display.<clinit>(Unknown Source)
	at Nehe11.Nehe11.init_lwjgl(Nehe11.java:59)
	at Nehe11.Nehe11.<init>(Nehe11.java:46)
	at Nehe11.Nehe11.main(Nehe11.java:278)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
	at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
	at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.lwjgl)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkLink(Unknown Source)
	at java.lang.Runtime.loadLibrary0(Unknown Source)
	at java.lang.System.loadLibrary(Unknown Source)
	at org.lwjgl.Sys.initialize(Unknown Source)
	at org.lwjgl.Sys.<clinit>(Unknown Source)
	... 15 more


this is of course (I think/hope) due to the fact taht lwjgl loads a dll, so webstart doesn't like to do that with unsigned software, so uh how do I sign (authenticate wahtever) my software to give it persmission to load dlls?

Or am I spitting gibberish out of my mouth (where else?) here? Can anyone direct me as to how to mix webstart with lwjgl (my jnlp is ok, lwjgl just won't load)

Thanks alot :)

Morgrog

Doing some research first could have helped :)

Ok then, how do I put dlls in a jar? simply add it as if it was a zip file (which in the end it is) :O

princec

Yes, you just put in in a jar file (either compressed or uncompressed, it doesn't matter) and make sure you refer to it as a native library in your jnlp file (look at the Alien Flux jnlp file).

Cas :)

Morgrog

Exerpt take from here

Quote
Note that a self-signed test certificate should only be used for internal testing, since it does not guarantee the identity of the user and therefore cannot be trusted. A trust-worthy certificate can be obtained from a certificate authority, such as VeriSign or Thawte, and should be used when the application is put into production.

What are the limitations of using a test certificate?

Will I still be able to run the app from wherever I want to or will I ahve security problems?

princec

What it does, if you use a self-signed cert, is put up a scary dialog box to the end user (see AF, again ;) ) telling them they shouldn't run the code at all!

It's a shame it costs so much to get a cert (several hundred dollars) because we've got absolutely bugger all money, and the number of Webstart downloads we get is negligable.

Cas :)