问题描述
//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"}
的
sslkeyRepository只是它包含一个目录位置.TAB .ARM的.crl .CRT .jks名.kdb .rdb .sth文件
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?
推荐答案
为你做SslKeyRepository必须指向一个.kdb文件,而不是一个目录。
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");
另外请注意,我没有后缀的文件扩展名的密钥存储文件名。 MQ客户端将自动添加名.kdb扩展名。请参阅本的了解更多详情。
此外,你需要设置只SSL_CIPHER_SUITE_PROPERTY在应用程序中。你没有设置SSL_CIPHER_SPEC_PROPERTY。请参阅下表的。
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.
这篇关于MQRC_KEY_REPOSITORY_ERROR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!