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 » Unable to import a certificate into Key store

Post new topic  Reply to topic
 Unable to import a certificate into Key store « View previous topic :: View next topic » 
Author Message
krys
PostPosted: Fri May 28, 2010 10:40 am    Post subject: Unable to import a certificate into Key store Reply with quote

Novice

Joined: 28 May 2010
Posts: 10

I am suppose to call a webservice via https, as part of this requirement I have created a key store and trying to import the SSL certificate (from target server) into the Message Broker V6.1 keystore using the following command.


gsk7cmd -cert -import -db devpartner_ssl_certificate.p12 -pw xxx -label CACert -type pkcs12 -target /var/mqsi/components/DBRK02/config/DBRK02.jks -target_pw
xxxxx

It's giving me the following exception

The specified database has been corrupted

Has any one come across this kind of issue? Please advice.

-KRYS
Back to top
View user's profile Send private message
harish_td
PostPosted: Sat May 29, 2010 9:18 pm    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Are you able to list the contents/certificates of this key-store using the same password which you are using for the IMPORT?
If you cannot list the contents, you cannot do the IMPORT
Back to top
View user's profile Send private message Yahoo Messenger
AndreasMartens
PostPosted: Fri Jun 04, 2010 2:13 am    Post subject: Reply with quote

Acolyte

Joined: 30 Jan 2006
Posts: 65
Location: Hursley, UK

Since you're modifying a jks keystore, why not call java's keytool directly?

keytool -importkeystore -srckeystore devpartner_ssl_certificate.p12 -destkeystore /var/mqsi/components/DBRK02/config/DBRK02.jks.jks -srcstoretype pkcs12 -deststoretype jks -srcstorepass pa55word -deststorepass pa55word

hope this helps,
Andreas
Back to top
View user's profile Send private message MSN Messenger
amitjain1984
PostPosted: Tue Dec 20, 2016 9:28 pm    Post subject: gsk7cmd - import error - specified database is corrupted Reply with quote

Newbie

Joined: 20 Dec 2016
Posts: 4

Hi Team,

I am trying to do certificate management using gsk7cmd command on linux.

But getting error
"The specified database has been corrupted." while importing in last command. Please suggest what I am doing wrong.


#To create and initialize a new key database
gsk7cmd -keydb -create -db key_database.kdb -pw AmitJain1 -expire 365;
#create certificate
gsk7cmd -cert -create -db key_database.kdb -pw AmitJain1 -size 1024 -dn "CN=mysite . com,OU=MYOU,O=my site,L=chennai,ST=Tamil Nadu,C=IN" -label ibmwebspheremqmq_ssl;
#extract the certificate
gsk7cmd -certreq -extract -db key_database.kdb -pw AmitJain1 -target ibmwebspheremqmq_ssl.arm -label ibmwebspheremqmq_ssl;

gsk7cmd -keydb -create -db jbossper.jks -pw AmitJain1 -type jks;
gsk7cmd -cert -create -db jbossper.jks -pw AmitJain1 -size 1024 -dn "CN=mysite . com,OU=MYOU,O=my site,L=chennai,ST=Tamil Nadu,C=IN" -label jbossperskey;
gsk7cmd -certreq -extract -db jbossper.jks -pw AmitJain1 -target jbosskey.arm -label jbossperskey;

gsk7cmd -keydb -create -db Newtruststore.jks -pw AmitJain1 -type jks;

gsk7cmd -cert -import -file ibmwebspheremqmq_ssl.arm -pw AmitJain1 -type kdb -label ibmwebspheremqmq_ssl -target Newtruststore.jks -target_pw AmitJain1 -target_type jks



Environment details :

Name: WebSphere MQ
Version: 7.0.1.3
CMVC level: p701-103-100813
BuildType: IKAP - (Production)


export JAVA_HOME=/opt/mqm/ssl/jre
export PATH=/opt/mqm/java/jre/bin:$PATH
Back to top
View user's profile Send private message
amitjain1984
PostPosted: Tue Dec 20, 2016 11:47 pm    Post subject: Reply with quote

Newbie

Joined: 20 Dec 2016
Posts: 4

Hi Team,

It is working fine now. I have changed import file to key store database , previously i was passing extracted certificate file name as parameter.

Thanks.

gsk7cmd -cert -import -file key.kdb -pw AmitJain1 -type cms -label ibmwebspheremqmq_ssl -target Newtruststore.jks -target_pw AmitJain1 -target_type jks;

Also below command printing the details fine now.
gsk7cmd -cert -details -db Newtruststore.jks -pw polaris123 -label ibmwebspheremqmq_ssl;


Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Unable to import a certificate into Key store
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.