トピックごとに pub/sub のチャネルに接続しようとしています。SSL をサポートする唯一のモードであるため、アンマネージド モードで実行しています。キーがアプリケーションと同じディレクトリにある場所を指定しましCIPHER SPEC
た(キーストアへのフルパスも試しましたが、どちらも機能しません)。そこには、証明書を使用するためのパスワード (暗号化された) を含む関連があります。以下はコード スニペットで、接続文字列とその他の機密情報は省略されています。KEY_REPO
key.kdb
key.sth
XMSFactoryFactory factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
IConnectionFactory connectionFactory = factoryFactory.CreateConnectionFactory();
connectionFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT_UNMANAGED);
connectionFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, "hostName");
connectionFactory.SetIntProperty(XMSC.WMQ_PORT, 1234);
connectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, "Channel");
connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "QueueManager");
connectionFactory.SetStringProperty(XMSC.WMQ_SSL_CIPHER_SPEC, "NULL_SHA");
connectionFactory.SetStringProperty(XMSC.WMQ_SSL_KEY_REPOSITORY, @"key");
connection = connectionFactory.CreateConnection();
Visual Studio で次の例外が発生します。これは、MQ クライアントがエラーをスローしたことを示しているだけです。
CWSMQ0006E: An exception was received during the call to the method
ConnectionFactory.CreateConnection: CompCode: 2, Reason: 2393. During
execution of the specified method an exception was thrown by another
component. See the linked exception for more information.
以下のイベント ログで、MQ クライアントによってスローされた特定のエラーを確認できます。
No SSL certificate for channel 'SECUREQUEUE.SVRCONN'.
The channel 'SECUREQUEUE.SVRCONN' did not supply a certificate to use during
SSL handshaking, but a certificate is required by the remote queue manager.
The channel did not start.
Ensure that the key repository of the local queue manager or MQ client contains an
SSL certificate which is associated with the queue manager or client. Alternatively,
if appropriate, change the remote channel definition so that its SSLCAUTH attribute
is set to OPTIONAL and it has no SSLPEER value set. &P If you have migrated from
WebSphere MQ V5.3 to V6, it is possible that the missing certificate is due to a
failure during SSL key repository migration. Check the relevant error logs. If
these show that an orphan certificate was encountered then you should obtain the
relevant missing certification authority (signer) certificates and then import
these and the orphan certificate into the WebSphere MQ V6 key repository, and then
re-start the channel.
このセットアップの何が問題なのか理解できないようです..何かアイデアはありますか?