4
//snippet
MQEnvironment.properties = GetConnectionProperties(); 

_queueManager = new MQQueueManager(QueueManager);  

//end of snippet

    private Hashtable GetConnectionProperties()
    {
        Hashtable properties = new Hashtable();
        properties.Add(MQC.USER_ID_PROPERTY, Environment.UserName);
        properties.Add(MQC.HOST_NAME_PROPERTY, MQHostname);
        properties.Add(MQC.PORT_PROPERTY, MQPortNumber);
        properties.Add(MQC.CHANNEL_PROPERTY, MqChannel);            
        properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);            

        if (_useSSL)
        {
            properties.Add(MQC.SSL_CIPHER_SUITE_PROPERTY, CipherSuite);
            properties.Add(MQC.SSL_PEER_NAME_PROPERTY, SslPeerName);              
            properties.Add(MQC.SSL_CIPHER_SPEC_PROPERTY, CipherSpec);
            properties.Add(MQC.SSL_FIPS_REQUIRED_PROPERTY, FipsRequired);
            properties.Add(MQC.SSL_CERT_STORE_PROPERTY, SslKeyRepository);        
        }

        return properties;
    }

throws {"MQRC_KEY_REPOSITORY_ERROR"}

the sslkeyRepository is just a directory location which contains .tab .arm .crl .crt .jks .kdb .rdb .sth files

Any ideas what i am missing here?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
user3931177
  • 41
  • 1
  • 2

1 Answers1

4

SslKeyRepository must point to a .kdb file and not to a directory as you have done. For example a client application will code for certificate store property as:

properties.Add(MQC.SSL_CERT_STORE_PROPERTY, "C:\\MyApp\\SSL\\client_certstore"); 

Also note that I have not suffixed the file extension to keystore file name. MQ client will automatically add the ".kdb" extension. Please see this link for more details.

Also you need to set only SSL_CIPHER_SUITE_PROPERTY in your application. You don't set SSL_CIPHER_SPEC_PROPERTY. See the table here.

Shashi
  • 14,980
  • 2
  • 33
  • 52