Avatar billede grave Nybegynder
10. maj 2002 - 14:47 Der er 12 kommentarer og
1 løsning

signing an applet

What do i do wrong ?

keytool -genkey -keystore testStore -alias testCert
keytool -selfcert -keystore testStore -alias testCert
keytool -export -keystore testStore -alias testCert -file testCer.cer
keytool -import -keystore testStore.store -alias testCer -file testCer.cer
jarsigner -keystore testStore testJar.jar testCert

i created a java.policy:

keystore "http://localhost/signed/testStore.store
grant signedBy "testCert" {
permission java.io.FilePermission "C:\\-", "write";
};

i put the:
java.policy
testCer.cer
testStore.store
testJar.jar
into http://localhost/signed

i still get the testFile: "caught security exception"
testStore.store

am i missing something, or doing something wrong ????
Avatar billede lyhr007 Nybegynder
10. maj 2002 - 15:04 #1
What browser and JRE version are you using?
Avatar billede grave Nybegynder
10. maj 2002 - 15:15 #2
i dont know what the clients use, but i have IE 6.0 and JRE 1.3.1.
and it wont work on mine
Avatar billede lyhr007 Nybegynder
10. maj 2002 - 15:18 #3
ok.

If the client has IE and MS VM (its a JRE 1.1), you will need to sign it with the MS JAVA SIGNING tool.

anyways do you get the security pop-up when you run the applet. It contains something like Do you trust blahblah ....  Grant this session, allways grant, no etc.

??
Avatar billede grave Nybegynder
10. maj 2002 - 15:24 #4
no i dont even get the popup, the applet just throw th e securiry exception...
Avatar billede grave Nybegynder
10. maj 2002 - 15:27 #5
can you give me a step by step howto that works ?
like the one i gave ??

what versions of what. etc...
Avatar billede lyhr007 Nybegynder
10. maj 2002 - 15:27 #6
You should get somthing like this if you have signed your code:

https://www.netbank.nordea.dk/netbank/index.jsp


Sorry for the example the only one I could remember.
Avatar billede grave Nybegynder
10. maj 2002 - 15:34 #7
no i dont get that popup on my applet.

i meant some code/keytool examples that works ?
Avatar billede lyhr007 Nybegynder
10. maj 2002 - 15:36 #8
We need to be sure that IE actually uses the SUN JRE and not the MS JRE.

Does it look exactly like this :

http://www.lyhr.dk/temp/security.jpg

Or does it have a more MS IE look to it ?
Avatar billede grave Nybegynder
10. maj 2002 - 15:42 #9
i dont get the popup !!!!

my applet just throws a security execption.
the jar isn't signed correctly.

så i ask if you can give me a step by step "howto sign the jar file"
like the desciption i gave in the first question.
Avatar billede lyhr007 Nybegynder
10. maj 2002 - 15:44 #10
https://www.netbank.nordea.dk/netbank/index.jsp

pleas press the link and look how it looks in your browser, and compare it with the image http://www.lyhr.dk/temp/security.jpg.

Are they identical?
Avatar billede grave Nybegynder
10. maj 2002 - 15:49 #11
there isnt a popup i have to sign the jar first.....
Avatar billede lyhr007 Nybegynder
10. maj 2002 - 16:02 #12
Please read the following carefully:

1: It could be that you have signed the applet correctly, but that the JRE in your browser does NOT support it. If the JRE in your browser is the default Microsoft Virtual Maschine, you get an exception because it requires you to sign it differently.

->Therefor first an foremost we must find out what JRE your browser uses. To do this you have to click on the link to unibank(because they use signed applet) and note what the popup looks like. Next you have to compare this with image at lyhr.dk.

Now if they are identical we know that the JRE is Sun's and then you have NOT signed the applet correcly. On the other hand if you get a different Popup from unibank, then it is MS VM and then you need to sign it with there signing tool, not the sun version.

Allways remove the source problem!

I dont say that this is the answer, but its a step on the way.


I cant be any cleare than this.
Avatar billede grave Nybegynder
17. januar 2005 - 15:33 #13
Luk
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester