Solved

jarsigner Certificate chain not found error

Posted on 2006-06-28
5
11,372 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
Comment Utility
0
 

Author Comment

by:znotte
Comment Utility
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
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

744 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

19 Experts available now in Live!

Get 1:1 Help Now