web-dev-qa-db-fra.com

JRE 1.7u45 incapable de charger une applet contenant des entrées non signées

Je reçois l'erreur suivante lors du chargement d'une applet Java sur JRE 1.7u45.

    Java.lang.SecurityException: com.Sun.deploy.net.JARSigningException: 
    Found unsigned entry in resource #name of the applet#
    at com.Sun.deploy.cache.CacheEntry.getJarFile(Unknown Source) 
    at com.Sun.deploy.model.ResourceProvider.getCachedJarFile(Unknown Source)
    at Sun.plugin.PluginURLJarFileCallBack$1.run(Unknown Source)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
    at Sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
    at Sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
    at Sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
    at Sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
    at Sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
    at Sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
    at Sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
    at com.Sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
    at com.Sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
    at com.Sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
    at Java.security.AccessController.doPrivileged(Native Method)
    at com.Sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
    at com.Sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
    at com.Sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
    at Java.security.AccessController.doPrivileged(Native Method)
    at com.Sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
    at com.Sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
    at com.Sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
    at Sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
    at Sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at Sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at Sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at Sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at Sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at Sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at Java.lang.ClassLoader.loadClass(Unknown Source)
    at Sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at Sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
    at Sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at Java.lang.Thread.run(Unknown Source)

Cet applet contient en effet une entrée non signée. Cependant, je ne peux pas faire signer cette entrée immédiatement en raison de problèmes techniques de tiers.

La même applet fonctionnait bien avec JRE 1.7u40, mais apparemment, quelques modifications ont été apportées à JRE 1.7u45 en ajoutant des fonctionnalités de sécurité supplémentaires.

J'ai essayé de réduire le niveau de sécurité en Java à moyen. Cela fonctionne sur MAC mais ne fonctionne malheureusement pas sur Windows.

Toute suggestion ou solution de contournement pour faire fonctionner l'applet serait grandement appréciée!

6
Gaurang

Vous devez désactiver les fichiers temporaires Java

Dans les fenêtres: 

  1. panneau de contrôle
  2. Java
  3. Onglet Général
  4. Fichier Internet temporaire
  5. Bouton Paramètres
  6. Élément de liste
  7. Nouvelle boîte de dialogue: boîte de dialogue Paramètres de fichiers temporaires
  8. désactiver l'option: conserver les fichiers temporaires sur mon ordinateur.
12
Saeed

Pour contourner ce problème, je viens de désactiver le cache Java sur l'ordinateur d'extrémité et l'applet a bien fonctionné.

5
Gaurang

Si vous utilisez des bibliothèques déjà compilées et empaquetées dans des fichiers JAR et signées par l'auteur, vous n'avez pas à vous soucier de les signer. Mais disons que vous avez utilisé le code source de quelqu'un d'autre (open source, espérons-le) et que vous l'avez compilé sur votre propre ordinateur, vous devez supprimer la signature existante et signer à nouveau ce paquet. Si vous utilisez des applets Java, ils doivent être signés maintenant, à moins que vous ne profitiez d'une montagne de douleur.

Maintenant, cela s'applique également aux bibliothèques empaquetées dans votre fichier jar emballé. S'ils ont déjà été signés, laissez-les seuls. Mais si vous devez les signer, assurez-vous de supprimer tout certificat existant du fichier JAR avant de le faire, de la même manière que votre applet principal.

Informations supplémentaires pouvant vous aider: Votre fichier MANIFEST.mf dans tous les fichiers JAR doit contenir des entrées pour les propriétés, comme indiqué dans l'exemple ci-dessous:

Application-Library-Allowable-Codebase: *
Permissions: all-permissions
Caller-Allowable-Codebase: * 
Codebase: *
Application-Name: POSInterface

POINTE 

Si vous déployez de nombreuses applets dans une application Web, j'aime automatiser tout ce processus de modification du manifeste et de signature du code avec un fichier de commandes et un fichier texte contenant les propriétés ci-dessus devant figurer dans le fichier manifest.mf. , nommé addToManifest.txt. Voici un exemple de la façon dont c'est fait:

@ECHO off
ECHO Changing manifest files for all...
jar ufm Applet_RFID.jar addToManifest.txt
jar ufm FingerPrintReader.jar addToManifest.txt
jar ufm jzebra.jar addToManifest.txt
jar ufm POSInterface.jar addToManifest.txt
jar ufm lib\access-bridge-32.jar addToManifest.txt
jar ufm lib\addToManifest.txt addToManifest.txt
jar ufm lib\dnsns.jar addToManifest.txt
jar ufm lib\dpuareu.jar addToManifest.txt
jar ufm lib\epsonupos.admin.jar addToManifest.txt
jar ufm lib\epsonupos.core.v1.13.0001.jar addToManifest.txt
jar ufm lib\epsonupos.H2000.jar addToManifest.txt
jar ufm lib\epsonupos.H6000IV.jar addToManifest.txt
jar ufm lib\epsonupos.jar addToManifest.txt
jar ufm lib\epsonupos.T20.jar addToManifest.txt
jar ufm lib\epsonupos.T81.jar addToManifest.txt
jar ufm lib\epsonupos.T81II.jar addToManifest.txt
jar ufm lib\epsonupos.T82.jar addToManifest.txt
jar ufm lib\epsonupos.T88V.jar addToManifest.txt
jar ufm lib\epsonupos.trace.jar addToManifest.txt
jar ufm lib\HWHydraSO.jar addToManifest.txt
jar ufm lib\jaccess.jar addToManifest.txt
jar ufm lib\jcl_editor.jar addToManifest.txt
jar ufm lib\jpos113-controls.jar addToManifest.txt
jar ufm lib\jpos113.jar addToManifest.txt
jar ufm lib\jssc_qz.jar addToManifest.txt
jar ufm lib\localedata.jar addToManifest.txt
jar ufm lib\plugin.jar addToManifest.txt
jar ufm lib\pos.jar addToManifest.txt
jar ufm lib\pos.v3.0001.jar addToManifest.txt
jar ufm lib\stario.jar addToManifest.txt
jar ufm lib\starjavapos.jar addToManifest.txt
jar ufm lib\sunec.jar addToManifest.txt
jar ufm lib\sunjce_provider.jar addToManifest.txt
jar ufm lib\sunmscapi.jar addToManifest.txt
jar ufm lib\sunpkcs11.jar addToManifest.txt
jar ufm lib\Symbol.RFID.API3.jar addToManifest.txt
jar ufm lib\uposcommon.core.v1.13.0001.jar addToManifest.txt
jar ufm lib\uposcommon.jar addToManifest.txt
jar ufm lib\xercesImpl.jar addToManifest.txt
jar ufm lib\xml-apis.jar addToManifest.txt
jar ufm lib\zipfs.jar addToManifest.txt
ECHO All JAR manifest have been altered.
PAUSE
ECHO Signing all Applets...
jarsigner Applet_RFID.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner FingerPrintReader.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner jzebra.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner POSInterface.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\access-bridge-32.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\-keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\dnsns.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\dpuareu.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.admin.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.core.v1.13.0001.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.H2000.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.H6000IV.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.T20.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.T81.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.T81II.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey> 
jarsigner lib\epsonupos.T82.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.T88V.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\epsonupos.trace.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\HWHydraSO.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\jaccess.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\jcl_editor.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\jpos113-controls.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\jpos113.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\jssc_qz.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey> 
jarsigner lib\localedata.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\plugin.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\pos.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\pos.v3.0001.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\stario.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\starjavapos.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey> 
jarsigner lib\sunec.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\sunjce_provider.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\sunmscapi.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\sunpkcs11.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\Symbol.RFID.API3.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\uposcommon.core.v1.13.0001.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\uposcommon.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\xercesImpl.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\xml-apis.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
jarsigner lib\zipfs.jar -keystore "C:\Certificate\YourCertificate.key" <keystoreName> -storepass <SecretKey>
ECHO All JAR files have been signed.
PAUSE
2
Brandon

J'ai rencontré un problème avec Java Web Start, où certains fichiers JAR contenaient des ressources non signées. Je devais supprimer les ressources non signées du fichier JAR, puis démissionner de ce dernier.

0
ceklock

J'ai dû désinstaller toutes les versions de Java, réinstaller la dernière version, effacer les invites, puis ajouter le site Web en tant que site de confiance. Après cela, l'application Java s'est bien chargée.

0
Phoenix14830