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 » General IBM MQ Support » runmqckm

Post new topic  Reply to topic
 runmqckm « View previous topic :: View next topic » 
Author Message
Boyd
PostPosted: Thu Apr 24, 2014 6:21 am    Post subject: runmqckm Reply with quote

Novice

Joined: 06 Apr 2014
Posts: 16

I am trying to import a key from a Windows machine into a .p12 on Linux

On Linux, I changed the policy to include the exp user

Code:
-bash-4.1$ setmqspl -m QM_VERIFY_AMS -p TEST.Q -s SHA1 -a "CN=alice,O=IBM,C=GB" -e AES256 -r "CN=bob,O=IBM,C=GB" -r "CN=exp,O=IBM,C=GB"

-bash-4.1$   dspmqspl -m QM_VERIFY_AMS -p TEST.Q
Policy Details:
Policy name: TEST.Q
Quality of protection: PRIVACY
Signature algorithm: SHA1
Encryption algorithm: AES256
Signer DNs:
  CN=alice,O=IBM,C=GB
Recipient DNs:
  CN=bob,O=IBM,C=GB
  CN=exp,O=IBM,C=GB
Toleration: 0
-bash-4.1$


I went to the Windows machine, deleted the previous keystore.jks,
and created a new one:

Code:
 Directory of C:\Users\exp\AMS

04/23/2014  01:18 PM    <DIR>          .
04/23/2014  01:18 PM    <DIR>          ..
04/16/2014  12:35 PM               173 keystore.conf
               1 File(s)            173 bytes
               2 Dir(s)  20,733,116,416 bytes free

C:\Users\exp\AMS>keytool -genkey -alias exp_Java_Cert -keyalg RSA -ke
ystore /users/exp/AMS/keystore.jks -storepass passw0rd -dname "CN=exp
, O=IBM, C=GB" -keypass passw0rd

C:\Users\exp\AMS>dir
 Volume in drive C has no label.
 Volume Serial Number is 74CC-2216

 Directory of C:\Users\exp\AMS

04/23/2014  01:21 PM    <DIR>          .
04/23/2014  01:21 PM    <DIR>          ..
04/16/2014  12:35 PM               173 keystore.conf
04/23/2014  01:21 PM             1,243 keystore.jks
               2 File(s)          1,416 bytes
               2 Dir(s)  20,733,112,320 bytes free



Then I exported the public key with a certificate:


Code:
C:\Users\exp\AMS>  keytool -export -keystore /users/exp/AMS/ke
ystore.jks -storepass passw0rd -alias exp_Java_Cert -file /users/exp/
AMS/exp_Java_Cert.cer
Certificate stored in file </users/exp/AMS/exp_Java_Cert.cer>

C:\Users\exp\AMS>dir
 Volume in drive C has no label.
 Volume Serial Number is 74CC-2216

 Directory of C:\Users\exp\AMS

04/23/2014  01:22 PM    <DIR>          .
04/23/2014  01:22 PM    <DIR>          ..
04/23/2014  01:22 PM               465 exp_Java_Cert.cer
04/16/2014  12:35 PM               173 keystore.conf
04/23/2014  01:21 PM             1,243 keystore.jks
               3 File(s)          1,881 bytes
               2 Dir(s)  20,733,112,320 bytes free


................................................................

I am trying to import ac key from a Windows machine into a .p12 on Linux

I am using the following as a guide:

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=%2Fcom.ibm.mq.amqzag.doc%2Ffa16110_.htm

But I cant quite seem to formulate the command correctly

My best attempt was:


Code:
[root@mmclnt1 Tim]# runmqckm -cert -import -db /home/alice/.mqs/alicekey.kdb -pw passw0rd -type cms -target /home/test/exp_Java_Cert.cer -target_pw passw0rd -target_type pkcs12 -label exp_Java_Cert

An IO Exception has occurred:
DerValue.getInteger, not an int 48


Any ideas on how I can resolve this ?

Can someone please help me with the proper formulation of the command
(or if what I am trying to do is possible),

I am trying to import a certificate with a public key from the .jks format into the .p12

Thanks
Back to top
View user's profile Send private message
Boyd
PostPosted: Thu Apr 24, 2014 12:04 pm    Post subject: Reply with quote

Novice

Joined: 06 Apr 2014
Posts: 16

This command worked well

Code:
runmqckm -cert -add -db /home/alice/.mqs/alicekey.kdb -pw passw0rd -label Exp_Java_Cert -file /home/test/Exp_Java_Cert.cer -format ascii
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Apr 25, 2014 5:02 am    Post subject: Reply with quote

Grand High Poobah

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

Code:
runmqckm -cert -import

This command can be used to import a cert from a DB.
So in your case do not specify the X509 cert file but specify the jks database and the cert label... (and the secondary db and dbtype ?)

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 » General IBM MQ Support » runmqckm
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.