Solved

jarsigner Certificate chain not found error

Posted on 2006-06-28
5
11,471 Views
Last Modified: 2012-05-05
Hi,

Is there a way to use my allready generated certificate in a diferent machine, without getting: jarsigner Certificate chain not found error?

Here is the scenario:
I´ve created a digital certificate on my machine (windows 2000), using keytool -genkey, like this:
     keytool -genkey -keyalg rsa -alias mycert
Then, with the mycert.csr file, I´ve created the mycert.cer file with my test CA.
Next, I´ve imported the .cer certificate using keytool -import:
     keytool -import -keystore .keytore -alias mycert -file studio.cer
And finally signed my jar file:
     jarsigner -storepass 123456 -signedjar asso-ja sso.jar mycert
Signing my jar file this way, worked pretty well. But only on one machine.

The problem goes here:
If i try to sign my jar on a DIFERENTmachine, using these steps:
1 - keytool -import -keystore .keytore -alias mycert -file studio.cer
2 - jarsigner -storepass 123456 -signedjar asso-ja sso.jar mycert
I get this error:
jarsigner: Certificate chain not found for: mycert.  mycert must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

Is there a way to use my allready generated certificate in a diferent machine?
The fact that my private key were generated on one machine, hinders it use on others?

Thanks.

0
Comment
Question by:znotte
  • 2
5 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 17000879
0
 

Author Comment

by:znotte
ID: 17001233
It seems that I need to use my private key, located in my keystore, if I wanna use the public certificate on other machines.

But imagine that I have hundreds of private keys in my keystore, and I just wanna use one of them. How do I extract a private key from my keystore and tranfer it to a new one?
0
 
LVL 35

Accepted Solution

by:
girionis earned 250 total points
ID: 17007707
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now