C# 使用pfx ca证书的.Net和IBM MQ受管连接SSL

C# 使用pfx ca证书的.Net和IBM MQ受管连接SSL,c#,.net,ssl,ssl-certificate,ibm-mq,C#,.net,Ssl,Ssl Certificate,Ibm Mq,下面的代码段始终返回2059 MQRC\u Q\u MGR\u NOT\u AVAILABLE。我没有设置任何.ini文件,这会有任何影响吗 服务器端日志状态如下错误: AMQ9637: During handshake, the remote partner sent no certificate. EXPLANATION: The conversation cannot begin because a certificate has not been supplied by the rem

下面的代码段始终返回
2059 MQRC\u Q\u MGR\u NOT\u AVAILABLE
。我没有设置任何.ini文件,这会有任何影响吗

服务器端日志状态如下错误:

AMQ9637: During handshake, the remote partner sent no certificate.

EXPLANATION:
The conversation cannot begin because a certificate has not been supplied by
the remote partner.
我的代码:

var properties = new Hashtable();
properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_MANAGED);
properties.Add(MQC.SSL_PEER_NAME_PROPERTY, "CN=BL9UZ8L");
MQEnvironment.Hostname = "xyz.com";
MQEnvironment.Port = 6000;
MQEnvironment.Channel = "2BMQ.NET.SPL";
MQEnvironment.SSLKeyRepository = "*SYSTEM";
MQEnvironment.SSLCertRevocationCheck = false;
MQEnvironment.SSLCipherSpec = "TLS_RSA_WITH_AES_128_CBC_SHA256";//"TLS_RSA_WITH_AES_256_CBC_SHA256";
MQEnvironment.CertificateLabel = "2BMQ_PROD";
Environment.SetEnvironmentVariable("MQDOTNET_TRACE_ON", "2");
queueManager = new MQQueueManager("BL9UZ8L", properties);

检查是否应为真?QEnvironment.SSLCertRevocationCheck=false;请参阅Wiki()。如果服务器需要TLS 1.3,则不接受CBC。您可能需要添加到客户端:System.Net.ServicePointManager.SecurityProtocol=System.Net.SecurityProtocolType。Tls12@jdweng:是的,我也尝试了SSLCertRevocationCheck=true,仍然相同。并且还尝试了System.Net.SecurityProtocolType.Tls11和System.Net.SecurityProtocolType.Tls12这两个仍然存在相同问题的版本。问题在客户端中。您是否将URL与HTTPS一起使用?您需要与MQ管理员检查队列管理器上的
AMQERR01.LOG
中产生了什么错误,在这种情况下,假设错误来自客户端,“远程合作伙伴未发送证书”引用了队列管理器。