|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
SSL on mq |
« View previous topic :: View next topic » |
Author |
Message
|
krish_blore |
Posted: Sun Dec 19, 2010 7:14 am Post subject: SSL on mq |
|
|
Novice
Joined: 29 Nov 2010 Posts: 19
|
Hi,
I need help for writing client/server program using SSL on MQ.
below is the requirement for me,
1. create the certificate.
2. authenticate the client before communicating using SSL.
1. I have created SSL certificate using gsk7cmd.
client.c
---------
MQMD mqmd = {MQMD_DEFAULT};
MQPMO pmo = {MQPMO_DEFAULT};
MQCNO connect_options = {MQCNO_DEFAULT};
MQCD mycd = {MQCD_CLIENT_CONN_DEFAULT};
MQSCO mysco = {MQSCO_DEFAULT};
MQCHAR qmname[MQ_Q_MGR_NAME_LENGTH];
MQHCONN Hcon;
count = atoi(argv[4]);
strncpy(qmname, argv[2], MQ_Q_MGR_NAME_LENGTH);
strncpy(mycd.ConnectionName, argv[3], MQ_CONN_NAME_LENGTH);
strncpy(mycd.ChannelName, "CHANNEL1", MQ_CHANNEL_NAME_LENGTH);
printf("Channel Name :%s\n", mycd.ChannelName);
/* For SSL **/
/** Specify Keystore file name without ".sto" **/
strncpy(mysco.KeyRepository, "/var/mqm/qmgrs/ssl/key",
MQ_SSL_KEY_REPOSITORY_LENGTH);
printf("Key Repository:%s\n", mysco.KeyRepository);
/** Specify CipherSpec */
strcpy(mycd.SSLCipherSpec,"TRIPLE_DES_SHA_US");
connect_options.SSLConfigPtr = &mysco;
connect_options.ClientConnPtr=&mycd;
connect_options.Version = MQCNO_VERSION_4;
printf("CipherSpec :%s\n", mycd.SSLCipherSpec);
/* Connect Qmgr */
MQCONNX(qmname, &connect_options, &Hcon, &compcode, &reason);
if (compcode == MQCC_FAILED){
printf("MQCONNX ended with reason code %ld\n", reason);
exit( (int)reason );
}
strcpy(mqod.ObjectName, argv[1]);
-----------------------------------------------------
export MQSERVER=CHANNEL1/TCP/server name(9001)'
export MQCHLLIB=/var/mqm/qmgrs/QM_APPLE/@ipcc
export MQCHLTAB=AMQCLCHL.TAB
please help me to write server side authentication programming....
Thanks for your time,
Krish |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Dec 19, 2010 8:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 20, 2010 5:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Locked as a double post of this  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
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
|
|
|
|