Detecting if the user has accepted a signed Java applet.

I have an Apple digitally signed applet. When a user visits the applet page on my website, they will be asked to accept the signed applet or not.

How can I determine if the user has accepted the applet? Either from javascript / html, or from the applet itself (if the user clicks the "Cancel" button, does it start with limited prvileges or does not start at all?) Or, perhaps, from another applet that is unsigned on the same page?

+4
source share
2 answers

In your Java applet initialization code segment, you can change the declared value of the javascript variable (ref: http://www.rgagnon.com/javadetails/java-0172.html ). In your javascript, the initial start of the event starts with javascript. This way, you may know that the user allows the java applet to modify the javascript variable.

+2
source

The code will work in the sandbox if the user refuses the digitally signed code.

Here's a demo of loading trusted applets in a defensive way that might be useful.

+2
source

Source: https://habr.com/ru/post/1333339/


All Articles