How to Generate Certificate Signing Request (CSR) in IBM WebSphere MQ with Command Line

Description

This document provides instructions for generating a Certificate Signing Request (CSR) for IMB Websphere MQ using command line. If you are unable to use these instructions for your server, RapidSSL recommends that you contact IBM.

NOTE: Before generating a CSR, you first need to create a key pair for your server.  These two items are a digital certificate key pair and cannot be separated.  If you lose your public/private key file, forget your password, or generate a new key file, your SSL Certificate will no longer match your private key.

NOTE: SHA-1 Signature Algorithm is the default in GSKit 7.0.4.27 and later. Ikeyman and Ikeycmd (gsk7md) v7 in IHS 6.0.2 and 
later support selecting between MD5 and SHA-1 by creating a "ikmuser.properties" in your working directory with a 
single line containing just: DEFAULT_SIGNATURE_ALGORITHM=SHA1_WITH_RSA

For more information about selecting  signature algorithm in ikeyman please refer to the IBM website

NOTE: To generate a CSR using the IKEYMAN GUI, follow the steps from this link: Generate CSR for IBM WebSphere MQ using IKEYMAN GUI

Step 1. Prepare your system

1.    Use the gsk7cmd command to create and sign the certificates. 

Run the gsk7cmd for a full list of the parameters you can use on the command:

For Linux

/opt/mqm/ssl/jre/bin/gsk7cmd 

For  Windows:

C:\Program Files\IBM\gsk7\bin\gsk7cmd

2.    Set the DISPLAY environment variable. For example: export DISPLAY=mypc:0.

- Ensure that the user's path contains /usr/bin.

- Set the JAVA_HOME environment variable:  

a) AIX: export JAVA_HOME =/usr/mqm/ssl/jre 
b) HP-UX: export JAVA_HOME =/opt/mqm/ssl 
c) Linux: export JAVA_HOME =/opt/mqm/ssl/jre 
d) Solaris: export JAVA_HOME =/opt/mqm/ssl

Step 2. Create a Keystore

1.    Run the following command to create a key repository

For Unix:

gsk7cmd -keydb -create -db filename -pw password -type cms -expire days –stash  

For Windows

runmqckm -keydb -create -db filename -pw password -type cms -expire days –stash

-db filename is the fully qualified name of a CMS key database, for example: dbkey.kdb 

-pw password is the password for the CMS key database, with an extension .cms.

-type cms is the type of database.

-expire days is the expiration time in days of the database password. The default is 60 days.

-stash tells iKeycmd to stash the key database password to a file 

NOTE: On Windows, the key database file (.kdb) is created with read permission for all user IDs, so it is not necessary to change permissions. On UNIX, .kdb and .sth files are created. Access permissions for the key database file are set to give access only to the user ID from which you used iKeyman or iKeycmd.

Step 3. Generate a CSR

NOTEAll certificates that will expire after October 2013 must have a 2048 bit key size.

1.    The CSR needs to contain the following Distinguished Name :

- Country Name (C): Use the two-letter code without punctuation for country, for example: US or CA.

- State or Province (S): Spell out the state completely; do not abbreviate the state or province name, for example: California.

- Locality or City (L): The Locality field is the city or town name, for example: Berkeley.

- Organization (O): If your company or department has an &, @, or any other symbol using the shift key in its name, you must spell out the symbol or omit it to enroll, for example: XY & Z Corporation would be XYZ Corporation or XY and Z Corporation.

- Organizational Unit (OU): This field is the name of the department or organization unit making the request.

- Common Name (CN): The Common Name is the Host + Domain Name. It looks like "www.company.com" or "company.com". 

2.    To generate a CSR, run the following command:

For Unix:

gsk7cmd -certreq -create -db -pw -label -dn "CN=My Queue Manager,O=My Company,C=UK-size -file 

For Windows:

runmqckm -certreq -create -db -pw -label -dn "CN=My Queue Manager,O=My Company,C=UK-size -file 

-db is the fully qualified name of a CMS key database, for example: dbkey.kdb 

-pw is the password for the CMS key database, with an extension .cms.

-label is the key label attached to the certificate, for example: "ibmwebspheremqqmname"

-dn is the X.509 distinguished name enclosed in double quotes, for example: "CN=My Queue Manager,
 O=My Company,C=UK

-size is the key size. The value must be 2048 bits.

-file is the filename for the certificate request, for example: QMNAME_request.arm

3.    The file you created contains the CSR.

4.    Proceed with Enrolment 

Contact Information

During the verification process, RapidSSL may need to contact your organization. 

Be sure to provide an email address, phone number and fax number that will be checked and responded to quickly. These fields are not part of the certificate.

IBM

For more information refer to IBM documentation

 

 

Disclaimer:

WarungSSL has made efforts to ensure the accuracy and completeness of the information in this document. However, WarungSSL makes no warranties of any kind (whether express, implied or statutory) with respect to the information contained herein. WarungSSL assumes no liability to any party for any loss or damage (whether direct or indirect) caused by any errors, omissions, or statements of any kind contained in this document.

Further, WarungSSL assumes no liability arising from the application or use of the product or service described herein and specifically disclaims any representation that the products or services described herein do not infringe upon any existing or future intellectual property rights. Nothing herein grants the reader any license to make, use, or sell equipment or products constructed in accordance with this document. Finally, all rights and privileges related to any intellectual property right described herein are vested in the patent, trademark, or service mark owner, and no other person may exercise such rights without express permission, authority, or license secured from the patent, trademark, or service mark owner. Geotrust reserves the right to make changes to any information herein without further notice.

Close

We uses cookies to remember and process the items in your shopping cart as well as to compile aggregate data about site traffic and interactions so that we can continue improving your experience on our site.