Problems with Signed Applets
Hello !
I have an applet program that displays the content of a batch file in the Applet window.
To sign the Applet I have converted the corresponding class file to a jar .
Then using keytool & jarsigner... I had signed it .
I tried to restrict the enuser form editing the contents of that batchfile's contents.
To restrict it I had Created a Policy file with only read permission allowed .
After following the above procedures , when i tried to run my applet, the applet is getting loaded sucessfully with that batch file's content .
And when i try to edit it , I'm able to edit the contents . I don't how this could be possible bcoz i have set the permission only to read it !
Any Ideas Please !
TIA
[773 byte] By [
IT_Skilla] at [2007-9-29 19:42:30]

in the policy file, you restrict the applet to only read files. but if you have already signed it and clicked Yes on the certification screen when loading the applet, the applet gets full permission.
the other thing is that you have a textarea field or something, you must set the textarea to readonly.
if you read in a file's content and display it in a textarea, the user can change the content of the textarea, but if your applet does not write the changes back to the file, the file won't be changed, although the user has changed the textarea content.
perhaps you might post some more info on the code you are using....
Thanks for ur Idea , I thought of this earlier ...
But what is the purpose of specifying the Access Permissions in the Policy file while all the permissions would be granted when i click yes in the Certificate Dialog ?
Please give me a clear Idea ............... :-)
Thanks in Advance !
with the policy file you can specify permissions for non-signed applets, for example.
in opera, my signed applet does not work (he does not recognize the sign method?)
so i can edit Opera.policy and grant the needed permissions to the codebase-url of the applet.
it then can do the privileged stuff, although opera sees it as unsigned applet.