Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8065882

Unable to load JNLP file from remote http server which support only TLS 1.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 8u40
    • 8u25
    • deploy
    • x86
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.8.0_25"
      Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
      Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      WIndows 7 SP1 32/64bit

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Http server which support TLS 1.0 and TLS 1.1 dowgrade only.

      A DESCRIPTION OF THE PROBLEM :
      When open an https URL which include JNLP file, and the remote server support only TLS 1.0. The JNLP loading will fail and cause applet unable to start.

      After investigate the problem, we understand Java 8 will use TLS 1.2 as default and find a workaround to change the option of deployment. However,
      the loading manager inside JRE should switch to TLS 1.1/1.0, when it fail to load JNLP file using TLS 1.2, since these options in Java Contraol Panel/Advanced tab are checked.


      REGRESSION. Last worked in version 7u72

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Open URL "https://test.com/app/app.jsp" with following JavaScript (this url is fake due to some reason. I can provide actual URL for testing via email,
      the URL works fine if open it via http protocal or in JRE6/7)
      <script type="text/javascript" src="/scripts/deployJava.js"></script>
      <script type="text/javascript">
      var attrs = { id:'MyApplet', code:'com.test.client.MyApplet.class', width:1, height:1} ;
      var params = {jnlp_href: '/applet/my-applet.jnlp'} ;
      deployJava.runApplet(attrs, params, '1.6');
      </script>


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      JNLP file loaded and applet started
      ACTUAL -
      Unable to load JNLP file.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Java Plug-in 11.25.2.18
      Using JRE version 1.8.0_25-b18 Java HotSpot(TM) Client VM
      User home directory = C:\Users\root
      ----------------------------------------------------
      c: clear console window
      f: finalize objects on finalization queue
      g: garbage collect
      h: display this help message
      l: dump classloader list
      m: print memory usage
      o: trigger logging
      q: hide console
      r: reload policy configuration
      s: dump system and deployment properties
      t: dump thread list
      v: dump thread stack
      x: clear classloader cache
      0-5: set trace level to <n>
      ----------------------------------------------------
      network: Created version ID: 1.8.0.25
      network: Created version ID: 1.8
      network: Created version ID: 8.0.25
      network: Cache entry not found [url: https://test.com/applet/my-applet.jnlp, version: null]
      network: Cache entry not found [url: https://test.com/applet/my-applet.jnlp, version: null]
      network: Cache entry not found [url: https://test.com/applet/my-applet.jnlp, version: null]
      network: Connecting https://test.com/applet/my-applet.jnlp with proxy=DIRECT
      network: Cache entry not found [url: file:/C:/Program%20Files/Java/jre1.8.0_25/lib/ext/sunec.jar, version: null]
      network: Cache entry not found [url: file:/C:/Program%20Files/Java/jre1.8.0_25/lib/ext/sunjce_provider.jar, version: null]
      network: Connecting http://test.com:443/ with proxy=DIRECT
      security: Loading SSL Root CA certificates from C:\Users\root\AppData\LocalLow\Sun\Java\Deployment\security\trusted.jssecacerts
      security: Loaded SSL Root CA certificates from C:\Users\root\AppData\LocalLow\Sun\Java\Deployment\security\trusted.jssecacerts
      security: Loading SSL Root CA certificates from C:\Program Files\Java\jre1.8.0_25\lib\security\cacerts
      security: Loaded SSL Root CA certificates from C:\Program Files\Java\jre1.8.0_25\lib\security\cacerts
      security: Obtain certificate collection in SSL Root CA certificate store
      security: Obtain certificate collection in SSL Root CA certificate store
      security: Loading Deployment SSL certificates from C:\Users\root\AppData\LocalLow\Sun\Java\Deployment\security\trusted.jssecerts
      security: Loaded Deployment SSL certificates from C:\Users\root\AppData\LocalLow\Sun\Java\Deployment\security\trusted.jssecerts
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Loading certificates from Internet Explorer ROOT certificate store
      security: Loaded certificates from Internet Explorer ROOT certificate store
      security: Loading certificates from Internet Explorer DISALLOWED certificate store
      security: Loaded certificates from Internet Explorer DISALLOWED certificate store
      security: Loaded blacklisted.certs file: C:\Users\root\AppData\LocalLow\Sun\Java\Deployment\security\blacklisted.certs
      security: SHA-256Certificate finger print: 0DC0AF1608F40CAE8FD57828EFC40FF1F85239AD37F0C9B5BE01D88A96D8B96A
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      security: SHA-256Certificate finger print: 30CE409631120A0C5AC548ABFB231789A847411C3818A56E9B06FEB1723CE797
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      security: SHA-256Certificate finger print: 7600295EEFE85B9E1FD624DB76062AAAAE59818A54D2774CD4C0B2C01131E1B3
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      security: Checking if SSL certificate is in Deployment permanent certificate store
      security: Loading certificates from Internet Explorer ROOT certificate store
      security: Loaded certificates from Internet Explorer ROOT certificate store
      security: Saving certificates in Deployment session certificate store
      security: Saved certificates in Deployment session certificate store
      javax.net.ssl.SSLException: Invalid Padding length: 96
      at sun.security.ssl.Alerts.getSSLException(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
      at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessController.doPrivileged(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
      at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
      at com.sun.deploy.model.ResourceProvider.getResource(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
      at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
      at sun.plugin2.main.client.PluginMain.access$200(Unknown Source)
      at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.crypto.BadPaddingException: Invalid Padding length: 96
      at sun.security.ssl.CipherBox.removePadding(Unknown Source)
      at sun.security.ssl.CipherBox.decrypt(Unknown Source)
      at sun.security.ssl.InputRecord.decrypt(Unknown Source)
      ... 30 more
      network: Connecting https://test.com/applet/my-applet.jnlp with proxy=DIRECT
      network: Connecting http://test.com:443/ with proxy=DIRECT
      security: Obtain certificate collection in SSL Root CA certificate store
      security: Obtain certificate collection in SSL Root CA certificate store
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: SHA-256Certificate finger print: 0DC0AF1608F40CAE8FD57828EFC40FF1F85239AD37F0C9B5BE01D88A96D8B96A
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      security: SHA-256Certificate finger print: 30CE409631120A0C5AC548ABFB231789A847411C3818A56E9B06FEB1723CE797
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      security: SHA-256Certificate finger print: 7600295EEFE85B9E1FD624DB76062AAAAE59818A54D2774CD4C0B2C01131E1B3
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      javax.net.ssl.SSLException: Invalid Padding length: 191
      at sun.security.ssl.Alerts.getSSLException(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
      at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessController.doPrivileged(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
      at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
      at com.sun.deploy.model.ResourceProvider.getResource(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
      at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
      at sun.plugin2.main.client.PluginMain.access$200(Unknown Source)
      at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.crypto.BadPaddingException: Invalid Padding length: 191
      at sun.security.ssl.CipherBox.removePadding(Unknown Source)
      at sun.security.ssl.CipherBox.decrypt(Unknown Source)
      at sun.security.ssl.InputRecord.decrypt(Unknown Source)
      ... 31 more
      com.sun.deploy.net.FailedDownloadException: Unable to load resource: https://test.com/applet/my-applet.jnlp
      at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
      at com.sun.deploy.model.ResourceProvider.getResource(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
      at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
      at sun.plugin2.main.client.PluginMain.access$200(Unknown Source)
      at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by:
      javax.net.ssl.SSLException: Invalid Padding length: 191
      at sun.security.ssl.Alerts.getSSLException(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
      at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessController.doPrivileged(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
      at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
      at com.sun.deploy.model.ResourceProvider.getResource(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
      at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
      at sun.plugin2.main.client.PluginMain.access$200(Unknown Source)
      at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.crypto.BadPaddingException: Invalid Padding length: 191
      at sun.security.ssl.CipherBox.removePadding(Unknown Source)
      at sun.security.ssl.CipherBox.decrypt(Unknown Source)
      at sun.security.ssl.InputRecord.decrypt(Unknown Source)
      ... 31 more
      network: Cache entry not found [url: https://test.com/applet/my-applet.jnlp, version: null]
      network: Connecting https://test.com/applet/my-applet.jnlp with proxy=DIRECT
      network: Connecting http://test.com:443/ with proxy=DIRECT
      security: Obtain certificate collection in SSL Root CA certificate store
      security: Obtain certificate collection in SSL Root CA certificate store
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: SHA-256Certificate finger print: 0DC0AF1608F40CAE8FD57828EFC40FF1F85239AD37F0C9B5BE01D88A96D8B96A
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      security: SHA-256Certificate finger print: 30CE409631120A0C5AC548ABFB231789A847411C3818A56E9B06FEB1723CE797
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      security: SHA-256Certificate finger print: 7600295EEFE85B9E1FD624DB76062AAAAE59818A54D2774CD4C0B2C01131E1B3
      security: Checking if certificate is in Internet Explorer DISALLOWED certificate store
      basic: JNLP2Manager.initialize(): JNLP not available: /applet/my-applet.jnlp
      basic: exception: null.
      java.lang.NullPointerException
      at sun.plugin2.applet.JNLP2Manager.getAppInfo(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Ignored exception: java.lang.NullPointerException
      basic: Dialog type is not candidate for embedding


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Change follow deployment settings in to false:
      deployment.security.TLSv1.1
      deployment.security.TLSv1.2


            dtitov Daniil Titov (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: