简体   繁体   English

Java Web Start代码库证书链

[英]java web start codebase certificate chain

I'm using Java Web Start (JWS) to deploy and run my JavaFX application. 我正在使用Java Web Start(JWS)部署和运行我的JavaFX应用程序。 The jnlp element of my jnlp file is defined as follows: 我的jnlp文件的jnlp元素定义如下:

<jnlp spec="1.0+" xmlns:jfx="http://javafx.com" codebase="http://www.example.com/software" href="MyJnlp.jnlp">

My application successfully launches using the configuration above. 我的应用程序使用上述配置成功启动。 I'm now trying to adjust the jnlp file such that the jars are downloaded over SSL. 我现在正尝试调整jnlp文件,以便通过SSL下载jar。 I purchased and installed an SSL certificate for my domain. 我为我的域购买并安装了SSL证书。 I've confirmed that the certificate was successfully installed by pointing my browser to https://www.example.com/software/MyJar.jar and verifying that the jar is downloaded. 通过将浏览器指向https://www.example.com/software/MyJar.jar并验证是否下载了jar,我已确认证书已成功安装。

I updated the jnlp element of my jnlp file as follows: 我更新了jnlp文件的jnlp元素,如下所示:

<jnlp spec="1.0+" xmlns:jfx="http://javafx.com" codebase="https://www.example.com/software" href="MyJnlp.jnlp">

When I launch the application by double clicking the jnlp file I get a warning from Java stating that "The connection to this website is untrusted" and clicking on "More Information" I see a message stating that "The Certificate Authority that issued the certificate is not trusted" ( warnings pictured here ) 当我通过双击jnlp文件启动应用程序时,我收到Java的警告,指出“与该网站的连接不受信任”,然后单击“更多信息”,我看到一条消息,指出“颁发证书的证书颁发机构是不信任”( 警告如图所示

My SSL certificate relies on a chain of SSL certificates to link it to a root certificate. 我的SSL证书依靠SSL证书链将其链接到根证书。 I opened the Java console and verified that my root certificate is present under the System section of the Secure Site CA "Certificate Type" tab ( pictured here ). 我打开了Java控制台,并验证了我的根证书是否存在于“ Secure Site CA ”的“证书类型””选项卡的“ System部分下( 如图所示 )。

As a test, I then tried importing my site's SSL certificate to the User section of the Secure Site "Certificate Type" tab. 作为测试,我然后尝试将站点的SSL证书导入“ Secure Site ”的“证书类型””选项卡的“ User部分。 After my site's SSL certificate was imported I no longer received the warning. 导入网站的SSL证书后,我不再收到警告。

Based on this test, it seems to me that Java may not be reading/able to read the intermediate certificates in the certificate chain that links my certificate to a root certificate. 根据此测试,在我看来,Java可能无法读取/无法读取将我的证书链接到根证书的证书链中的中间证书。

I'd like my users to be able to launch the JWS application over https without importing my site's certificate or being prompted with a warning. 我希望我的用户能够通过https启动JWS应用程序,而无需导入我的站点的证书或得到警告提示。 Can anyone help? 有人可以帮忙吗?

Upon further investigation, it appears that my original suppositions surrounding the source of the failure may have been incorrect. 经过进一步调查,看来我关于故障根源的最初假设可能是错误的。 I used openssl to view the certificate and certificate chain presented by the server hosting my Java Web Start codebase (I'm using openshift). 我使用openssl查看托管Java Web Start代码库的服务器提供的证书和证书链(我正在使用openshift)。 The SSL data showed that although the SSL certificate for my custom domain was being presented, the certificate chain corresponded to RedHat's default SSL configuration (which obviously does not validate my custom domain's certificate). SSL数据显示,尽管提供了我的自定义域的SSL证书,但证书链与RedHat的默认SSL配置相对应(显然,它不验证我的自定义域的证书)。

My-MacBook-Pro:~ username$ openssl s_client -connect www.example.com:443
CONNECTED(00000003)
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert SHA2 High Assurance Server CA
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
 0 s:/C=US/ST=North Carolina/L=Raleigh/O=Red Hat Inc./CN=*.rhcloud.com
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
 1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
---
Server certificate
-----BEGIN CERTIFICATE-----
***CERTIFICATE FOR MY CUSTOM DOMAIN***
-----END CERTIFICATE-----

Since the server was presenting the certificate chain for openshift's default SSL support I decided to change the codebase attribute of my jnlp file to point to Redhat's provided domain which resolved the "Untrusted Connection" error. 由于服务器为openshift的默认SSL支持提供了证书链,因此我决定更改jnlp文件的codebase属性,使其指向Redhat提供的域,该域解决了“不受信任的连接”错误。

I'm satisfied with this outcome. 我对这个结果感到满意。 However, to use my custom domain I believe the right course of action would be to follow-up with Redhat to determine why the pem file which included my certificate chain is not being presented when accessing the server using my custom domain name. 但是,要使用我的自定义域,我相信正确的做法是跟Redhat一起确定在使用我的自定义域名访问服务器时,为什么没有显示包含我的证书链的pem文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM