How To Java Programming Uncategorized
How to Code Signing to Your Java Project
January 9, 2018
0

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.

Windows-only preparation

If you use Windows, you must complete the following steps before generating your CSR.

  1. Run cmd as 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.
  2. Move to your JDK installation’s bin directory:
    cd C:\Program Files\java\jdkversion number\bin

 

CREATE A KEYSTORE

  1. Create a keystore called codesignstore:
    keytool -genkey -alias codesigncert -keyalg RSA -keysize 2048 -keystore codesignstore
  2. 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

  1. Enter your keystore’s password and press enter.
  2. Open your CSR. How you do that depends on your OS:
    OS Command
    Mac OS X
    nano mycsr.pem
    Windows
    start notepad "mycsr.pem"
  3. Copy your CSR, including the entirety of the lines containing BEGIN NEW CERTIFICATE REQUEST and END NEW CERTIFICATE REQUEST.

ACTIVATE YOUR CREDIT

  1. Log in to your GoDaddy account.
  2. Click SSL Certificates.
  3. Next to the SSL certificate credit you want to use, click Set up.
  4. If you have multiple credits, select the credit you want to use, and then click Set up.
  5. Refresh the page; you should see a New Certificate. If you don’t, continue to refresh the page until you do.

REQUEST YOUR CERTIFICATE

  1. Next to your New Certificate, click Manage.
  2. Paste the CSR you generate in the CSR field, and then click Next.
  3. 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.

About author

ZERIN

CEO & Founder (BdBooking.com - Online Hotel Booking System), CEO & Founder (TaskGum.com - Task Managment Software), CEO & Founder (InnKeyPro.com - Hotel ERP), Software Engineer & Solution Architect

hitpath API: Read Affiliates Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

hitpath API: Read Campaigns Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

hitpath API: Read Advertisers Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

There are 0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *