ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » keytool error: java.lang.Exception: Input not an X.509 certi

Post new topic  Reply to topic
 keytool error: java.lang.Exception: Input not an X.509 certi « View previous topic :: View next topic » 
Author Message
praveenmq
PostPosted: Sun Jun 03, 2012 1:11 am    Post subject: keytool error: java.lang.Exception: Input not an X.509 certi Reply with quote

Voyager

Joined: 28 Mar 2009
Posts: 96

Hi ,

I tried to add a certificate in a trustore using the keytool command.

But the keytool exited with the below error
"keytool error: java.lang.Exception: Input not an X.509 certi".

I contacted the vendor and they said that the certificate is an x.509 certificate. Is there any parameter we need to pass in keytool import command when adding a certificate as an X.509 certificate.

Thanks,
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jun 03, 2012 1:00 pm    Post subject: Re: keytool error: java.lang.Exception: Input not an X.509 c Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

praveenmq wrote:
Hi ,

I tried to add a certificate in a trustore using the keytool command.

But the keytool exited with the below error
"keytool error: java.lang.Exception: Input not an X.509 certi".

I contacted the vendor and they said that the certificate is an x.509 certificate. Is there any parameter we need to pass in keytool import command when adding a certificate as an X.509 certificate.

Thanks,

Can display part of the cert? Some programs output some extra stuff that you might have to remove before importing...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
praveenmq
PostPosted: Sun Jun 03, 2012 9:41 pm    Post subject: Re: keytool error: java.lang.Exception: Input not an X.509 c Reply with quote

Voyager

Joined: 28 Mar 2009
Posts: 96

fjb_saper wrote:

Can display part of the cert? Some programs output some extra stuff that you might have to remove before importing...



You mean listing the certificate? I cant list the certificate before importing it.
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Sun Jun 03, 2012 10:21 pm    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi praveenmq,

What is your operating system, how did you receive the certificate, can you try to fetch the certificate from command line with for example openssl, did you do any Googling with your exception?

--
Marko
Back to top
View user's profile Send private message Visit poster's website
praveenmq
PostPosted: Sun Jun 03, 2012 10:23 pm    Post subject: Reply with quote

Voyager

Joined: 28 Mar 2009
Posts: 96

Hi Marko,

I previously had the same certificate which was expired and was given the new certificate by vendor.

I removed the certificate from the store and i tried to add the new certificate which was issued, During the import i faced this error.

I did some googling with he exception but nothing helped.

Thanks,
Praveen.
Back to top
View user's profile Send private message
praveenmq
PostPosted: Sun Jun 03, 2012 10:25 pm    Post subject: Reply with quote

Voyager

Joined: 28 Mar 2009
Posts: 96

My OS is AIX.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jun 04, 2012 12:26 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

praveenmq wrote:
was given the new certificate by vendor.


But how did they give it to you? By carrier pigeon? Semaphore? Smoke signals?

It is possible that the method of sending it to you corrupted it.

Get them to send it wrapped in a .zip (or .tar) file.
That way, if you can unzip it/untar it, you know it has not been corrupted.
Also get them to do an MD5sum on it before sending. Then do the same on the file you receive.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
praveenmq
PostPosted: Mon Jun 04, 2012 12:30 am    Post subject: Reply with quote

Voyager

Joined: 28 Mar 2009
Posts: 96

smdavies99 wrote:


But how did they give it to you? By carrier pigeon? Semaphore? Smoke signals?



I received the certificate in a mail the extension is in .pfx format.

I will request the vendor to send it zipped.

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 04, 2012 7:55 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

praveenmq wrote:
smdavies99 wrote:


But how did they give it to you? By carrier pigeon? Semaphore? Smoke signals?



I received the certificate in a mail the extension is in .pfx format.

I will request the vendor to send it zipped.

Thanks

You may want to ask for it in ASCII format as well. I believe you have to consider a .pfx as binary format.
When looking at a cert in ASCII format it should look like this
Code:
------------------- Begin Certificate ---------------------------
here is a bunch of chars representing a byte array 64 bit encoded on a max of 80 char width
------------------------- End Certificate ------------------------------


Note: number of dashes and case of the boundary lines is not accurate.

Anything before the Begin Certificate line may not be accepted.
As well anything after the End Certificate line, even a blank line may cause for the program to qualify the cert as corrupted...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » keytool error: java.lang.Exception: Input not an X.509 certi
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.