I have a JAVA Applet to perform digital signatures, certificate validations, and so on. It's signed with a valid certificate, it has a correct Manifest (I suppose) with values as:
Permissions: all-permissions
Specification-Title: Applet Certificados digitales
Specification-Version: v1.3
Specification-Vendor: mycompany
Application-Name: Applet Java mycompany
And, it works perfectly, into a "applet" tag, thanks to NPAPI friendly browsers (tested only on Firefox and IExplorer). It has been running so by years ...
Now I want to let Chrome and Edge users use it, by using JNLP. And here it's ALMOST ok. I say "almost" because I can read store certificates, access to my ASP.NET WebApi, perform digital signatures .... but now I can't open smart cards to read certificates, due that SecurityException when I set the security manager:
public SmartCardProvider_SecurityManager(final ApduConnection conn) {
super(NAME, VERSION, INFO);
defaultConnection = conn;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
@Override
public Void run() {
if (!(System.getSecurityManager() instanceof SmartCardProvider_SecurityManager)) {
System.setSecurityManager(new SmartCardProvider_SecurityManager(System.getSecurityManager()));
// Exception -> JVM Shared, not allowed to set security manager
}
....
Where
private static final class SmartCardProvider_SecurityManager
extends SecurityManager { .....
This is my JNLP:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="" href="thefile.JNLP">
<information>
<title>mycompany - JAVA apps</title>
<vendor>mycompany</vendor>
<homepage href="http:\\www.mycompany.com" />
<description>the description</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="APPLET_NAME.jar" main="false" />
</resources>
<applet-desc documentBase=""
name="the_name"
main-class="myjavanamespace.clsApplet"
width="450"
height="250">
<param name="0123225223 ..... /> some ciphred params ...
<param name="permissions" value="all-permissions" />
</applet-desc>
My last try was to add this param:
<param name="separate_jvm" value="true"/>
But I get the same exception. I am out of ideas, so any help will be appreciated.
Current run enviroment:
Java Plugin 11.72.2.15
Using JRE 1.8.0_72-b15 Java HotSpot(TM) 64-Bit Server VM