Sun GlassFish Message Queue 4.4 Developer's Guide for C Clients


The MQInitializeSSL function initializes the SSL library.

MQInitializeSSL (ConstMQString certificateDatabasePath);

Return Value

MQStatus. See the MQStatusIsError() function for more information.



An MQString specifying the path to the directory that contains the certificate data base files.

The Message Queue C-API library uses NSS to support the SSL transport protocol between the Message Queue C client and the Message Queue broker.

Before you connect to a broker over SSL, you must initialize the SSL library by calling the MQInitializeSSL function. If your client uses secure connections, you must call this function once and only once before you create any connection, even if that connection is not an SSL connection.

The certificateDatabasePath parameter specifies the path to the NSS certificate database where cert7.db or cert8.db , key3.db, and secmod.db files are located.

The work required to configure secure communication includes initializing the SSL library using the MQInitializeSSL function. There may be additional work, depending on whether the broker is trusted (the default setting) and on whether you want to provide an additional means of verification if the broker is not trusted and the initial attempt to create a secure connection fails. For complete information see Working With Secure Connections.

You must take care if the client application using secure Message Queue connections uses NSS (for other purposes) directly as well and does NSS initialization. For additional information, see Coordinating NSS Initialization.

Common Errors