Signieren einer webstart jnlp datei

W

webstarter

Hallo,

ich habe eine Webstart Anwendung erstellt und alle jar files mit dem jarsigner signiert.
Nun bekomme ich beim starten noch die Fehlermeldung:

Zwar hat die Anwendung eine digitale Signatur, bei der zugeordneten Datei (JNLP) fehlt diese jedoch.
Eine digitale Signatur stellt sicher, dass die Datei vom Anbieter stammt und nicht verändert wurde.

Nun habe ich schon Stunden im Web gesucht, kann aber nichts finden, wie man eine JNLP signiert.

Danke im Voraus
 
Hallo,

Die jnlp Datei muß als
JNLP-INF/APPLICATION.JNLP
in die Jarfile mit der Main Methode gepackt werden.
Durch das Signieren der Jar wird diese auch mit signiert.

Sie kann auch einen anderen Namen als APPLICATION.JNLP haben.

happy Coding
 
Danke sagi7,

man lernt nie aus.

Ich habe auf die schnelle folgende Links gefunden:
http://www.zeeman.de/computer/java6-update-folgt-nun-der-jnlp-spec-101
http://72.5.124.102/thread.jspa?messageID=10555196#10555196

Und folgendes steht in der Spezifikation jnlp-1_0_1-spec.pdf von sun:

5.4.1 SIGNING OF JNLP FILES
A JNLP file can optionally be signed. A JNLP Client must check if a signed version of the JNLP file
exists, and if so, verify that it matches the JNLP file that is used to launch the application. If it does not
match, then the launch must be aborted. If no signed JNLP file exists, then the JNLP file is not signed,
and no check needs to be performed.
A JNLP file is signed by including a copy of it in the signed main JAR file. The copy must match the
JNLP file used to launch the application. The signed copy must be named: JNLPINF/
APPLICATION.JNLP. The APPLICATION.JNLP filename should be generated in upper case,
but should be recognized in any case.
The signed JNLP file must be compared byte-wise against the JNLP file used to launch the application. If
the two byte streams are identical, then the verification succeeds, otherwise it fails.
As described above, a JNLP file is not required to be signed in order for an application to be signed. This
is similar to the behavior of Applets, where the Applet tags in the HTML pages are not signed, even when
granting unrestricted access to the Applet.

Das Signieren der jnlp-Datei ist optional, man muß es also nicht machen.
Wenn man es doch macht, muß die jnlp-Datei, welche man zum Download anbietet und die jnlp-Datei, welche sich in der jar-Datei befindet, gleich sein. Lt. Spec werden beide Dateien eingelesen und die Byte-Ströme miteinander verglichen. Wenn diese nicht gleich sind, ist die Verifizierung fehlgeschlagen.

MfG
hansmueller
 
Zurück