签署 .Jar 文件 [英] Signing .Jar file

查看:27
本文介绍了签署 .Jar 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我坐着有点问题.我正忙于为我们的支持团队创建一个 php/html 网站(内联网),以便在支持 linux 机器时使生活更轻松.

Im sitting with a bit of a problem. Im busy creating a php/html website (intranet) for our support team to make life a bit easier when support linux machines.

我有一个名为 mindterm(免费版本)的 .jar 应用程序,我想在站点中将它作为小程序运行.

I have a .jar app called mindterm (the free version) and want to run it as an applet in the site.

但是,根据他们的网站,您必须在将 .jar 文件作为小程序加载之前对其进行签名,否则它无法打开 tcp 连接.

However according to their site you have to have the .jar file signed before loading it as an applet otherwise it cant open tcp connections.

因此,我尽我所能地进行了研究,并得出了 JDK 安装中提供的 jarsigner.exe 和 keytool.exe 文件.

So i did as much research as i could in the time i had and came up with the jarsigner.exe and keytool.exe files provided in the JDK installation.

但是,我不知道如何签署此应用程序以便我可以实际使用它.

However i do not have a clue how to go about signing this app so that i can actually use it.

有什么帮助吗?

谢谢

推荐答案

首先使用 keytool 创建一个密钥对.

First create a key-pair using keytool.

keytool -genkey -alias somekeyname

然后使用 jarsigner 用您刚刚创建的密钥对其进行签名.

Then use jarsigner to sign it with the key you just created.

jarsigner /path/to/jar somekeyname

注意,您需要使用与创建密钥相同的别名(此处为somekeyname).

Note, you need to use the same alias (somekeyname here) as the one you create the key with.

现在,由于证书是自签名的,系统将提示您的小程序用户批准该证书.一旦他们这样做了,你的 tcp 连接就应该可以工作了.

Now, since the certificate is self-signed, the user of your applet will be prompted to approve the certificate. Once they do so, your tcp connections should work.

因为我假设您只在组织内部使用小程序,所以自签名证书应该没问题.否则,您将需要支付证书费用.在这种情况下,您的用户在第一次之后不需要接受证书(如果他们选择始终允许").

Since I assume you're only using the applet internally in your organization, self-signed certs should be fine. Otherwise you will have to pay for a certificate. In that case, your users will not need to accept the certificates after the first time (if they choose Always Allow").

这篇关于签署 .Jar 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆