|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| runmqckm | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | Boyd | 
			  
				|  Posted: Thu Apr 24, 2014 6:21 am    Post subject: runmqckm |   |  |  
		  | Novice
 
 
 Joined: 06 Apr 2014Posts: 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 |  |  
		  |  |  
		  | Boyd | 
			  
				|  Posted: Thu Apr 24, 2014 12:04 pm    Post subject: |   |  |  
		  | Novice
 
 
 Joined: 06 Apr 2014Posts: 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 |  |  
		  |  |  
		  | fjb_saper | 
			  
				|  Posted: Fri Apr 25, 2014 5:02 am    Post subject: |   |  |  
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 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 |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | 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
 
 |  |  |  |