Recently I was developing an App using Java that will be launched from Website Directly using JNI Technique. I have created a Jar file. But problem is your Jar File will be not leaded or run if the Jar File is not signed with any Code Signing Certificate.
You must generate the CSR from your local machine and not from the web server you’re using to host the file.
If you use Windows, you must complete the following steps before generating your CSR.
cmdas an administrator, If you are using windows8:
Click start button
In the search box, type command prompt
From the result, right-click command prompt and click Run as administrator. Then execute the keytool command.
- Move to your JDK installation’s
cd C:\Program Files\java\jdkversion number\bin
CREATE A KEYSTORE
- Create a keystore called codesignstore:
keytool -genkey -alias codesigncert -keyalg RSA -keysize 2048 -keystore codesignstore
- Complete the information requested from you at the command prompt. There are a few important things to note:
- It’s important that this information is consistent with everything else you plan to use in your request.
- You will have to provide a password and note your keystore’s password because you must have it to sign your Java code.
GENERATE A CSR
Generate your CSR:
keytool -certreq -v -alias codesigncert -file mycsr.pem -keystore codesignstore
- Enter your keystore’s password and press enter.
- Open your CSR. How you do that depends on your OS:
OS Command Mac OS X
start notepad "mycsr.pem"
- Copy your CSR, including the entirety of the lines containing BEGIN NEW CERTIFICATE REQUEST and END NEW CERTIFICATE REQUEST.
ACTIVATE YOUR CREDIT
- Log in to your GoDaddy account.
- Click SSL Certificates.
- Next to the SSL certificate credit you want to use, click Set up.
- If you have multiple credits, select the credit you want to use, and then click Set up.
- Refresh the page; you should see a New Certificate. If you don’t, continue to refresh the page until you do.
REQUEST YOUR CERTIFICATE
- Next to your New Certificate, click Manage.
- Paste the CSR you generate in the CSR field, and then click Next.
- Enter your organization’s information – which has to match the information you used when creating your CSR – and then click Finish.
VERIFY YOUR SSL CERTIFICATE REQUEST
After requesting certificate GoDaddy validate that you control the domain name which you’re trying to secure.