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 » IBM MQ Security » SSL on mq

Post new topic  This topic is locked: you cannot edit posts or make replies.
 SSL on mq « View previous topic :: View next topic » 
Author Message
krish_blore
PostPosted: Sun Dec 19, 2010 7:14 am    Post subject: SSL on mq Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Sun Dec 19, 2010 8:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Do not double-post.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Dec 20, 2010 5:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  This topic is locked: you cannot edit posts or make replies. Page 1 of 1

MQSeries.net Forum Index » IBM MQ Security » SSL on mq
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.