Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / April 2005

Tip: Looking for answers? Try searching our database.

Newbie stuck with keytool but certificate appears valid

Thread view: 
Soterro - 18 Apr 2005 12:21 GMT
Hi all,

I just started to play with certificates things, and I got stuck doing
the first steps that any tutorial has. I'm running on a linux RH9 with
JDK 1.4.2_08 if that matters.

So I edited the openssl.cnf with some personal details, then I created a
CA with:
# ./CA -newca

then I create a request and I sign it:
# ./CA -newreq
# ./CA -sign

Shouldn't be that difficult.
However the generated server certificate newcert.pem cannot be imported
by any version of keytool (from JDK 1.4 or 5, on linux or windows)
because it always gives me:
# keytool -import -file newcert.pem -keystore mynewstore.ks
java.security.SignatureException: Signature does not match.

(I already edited the .pem to get out the lines before BEGIN as it was
not a X509 before) So I'm just unable to use keytool to add it to a
repository. I can print it with -princert though (if that matters)

The certificate must be good, I configured OpenLDAP to use it and accept
only secure connections, and I'm able to import and connect securely
with JXplorer _with that server certificate_. With another certificate
I'm not able, so OpenLDAP IS checking the certificates. However, keytool
doesn't like it.

What am I doing wrong with keytool then? I also added the cacert.pem to
the java cacerts files and the -trustcacerts switch to keytool, nothing
changed.

Thanks a lot,
S
Soterro - 19 Apr 2005 09:18 GMT
> # keytool -import -file newcert.pem -keystore mynewstore.ks
> java.security.SignatureException: Signature does not match.

Got it finally.
Problem was, for the ones who care:
"Organizational Unit Name" of the CA was _the same_ as the one for the
server I issued the certificate for.
Of course I have no idea why was that a problem, but as soon I entered
something else there, it worked.

S


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.