Signature File .Jar

Im sitting with a little problem. I am busy creating a php / html (intranet) website for our support team to make life a little easier with Linux machine support.

I have a .jar application called mindterm (free version) and you want to run it as an applet on a site.

However, according to their site, you must have a signed .jar file before downloading it as an applet, otherwise it will not be able to open tcp connections.

So, I did as much research as I could at the time I had, and came up with the jarsigner.exe and keytool.exe files specified in the JDK installation.

However, I have no clue how to go about signing this application so that I can use it.

Any help?

thanks

+6
source share
4 answers

First create a key pair using keytool .

 keytool -genkey -alias somekeyname 

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

 jarsigner /path/to/jar somekeyname 

Please note: you need to use the same alias ( somekeyname here) as the one with which you create the key.

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

Since I assume that you use the applet only within the organization, self-signed certificates should be in order. Otherwise, you will have to pay for the certificate. In this case, your users will not need to accept certificates after the first time (if they choose Always Allow).

+13
source

You can sign banks using:

Install this Eclipse Plugin

Eclipse Webstart Plugin.

You just need to export as "Webstart". He will offer you to sign the jars.

Demo

+1
source

This is a somewhat complicated area, and you essentially need to know what you are doing, and you may have to pay real money for a signature certificate.

The Sun Java tutorial covers the topic well: http://docs.oracle.com/javase/tutorial/deployment/jar/signing.html

If the goal is to provide people with SSH client support, there may be better solutions.

0
source

Let's combine the top answer with some useful hints to completely disable the script:

 keytool -genkey -noprompt -alias Alias -dname "CN=Hostname, OU=OrganizationalUnit, O=Organization, L=City, S=State, C=Country" -keystore path.to.keystore -storepass password -keypass password -validity 3650 jarsigner -keystore path.to.keystore -storepass password -keypass password -signedjar signed.jar unsigned.jar Alias 
0
source

Source: https://habr.com/ru/post/947637/


All Articles