3 Mar 2004 osullivj   » (Journeyer)

SSL & pymqi: I got an email about SSL and Les Smithson's pymqi this morning. I added some code to pymqi a couple of years ago, and it turns out that my code needs further extension to enable SSL support. I don't have time to do this work myself. But I thought I'd better blog my recommmendations so they're in the Google cache for anyone else who runs into this issue.

First off, you need IBM's SSL MQ sample. You can find this by Googling for ssl mq mc6c. It has some example code: amqscnxc.c, which shows the SSL config info being put into a struct that's passed to MQCONNX. The struct is an MQCNO which pymqi 4c doesn't implement. MQCNO holds a ptr to an MQCD, which I added to an earlier version of pymqi.

So to enable SSL configuration in pymqi, you must implement a Python class for the MQCNO struct, and allow it to be passed into QueueManager.connectWithOptions, and then into MQCONNX. The following changes to pymqi will be needed...

  • Add class cno(MQOpts) to pymqi.py. Use my cd class as a template, but follow the structure of MQCNO.
  • Change QueueManager.connectWithOptions() to add an extra param: an instance of your new cno class.
  • Change pymqe_MQCONNX() in pymqe.c to extract the new param you added in 2, and pass it through to MQCONNX.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!