1

トピックごとに pub/sub のチャネルに接続しようとしています。SSL をサポートする唯一のモードであるため、アンマネージド モードで実行しています。キーがアプリケーションと同じディレクトリにある場所を指定しましCIPHER SPECた(キーストアへのフルパスも試しましたが、どちらも機能しません)。そこには、証明書を使用するためのパスワード (暗号化された) を含む関連があります。以下はコード スニペットで、接続文字列とその他の機密情報は省略されています。KEY_REPOkey.kdbkey.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.

このセットアップの何が問題なのか理解できないようです..何かアイデアはありますか?

4

1 に答える 1

1

このエラーは、QMgr の証明書がクライアントによって検証されたことを示しているようです。これは、KDB ファイルと STH ファイルが見つかったことを意味します。現在、クライアント側の証明書を検証しようとしています。ということは、おそらく…

a) おそらくラベルが原因で、クライアント証明書が見つからない
b) QMgr がクライアントの公開鍵 (自己署名) または CA ルートを持っていない

私は通常、この他の SO 回答で概説されている手順に従って、TLS チャネル テストを検証します。 テストに成功した場合SSLCAUTH(OPTIONAL)、私の推測を確認する傾向があります。それでもうまくいかない場合は、自己署名証明書を使用したかどうか、QMgr の KDB の内容、REFRESH SECURITY TYPE(SSL)キーストアの更新後に QMgr で実行したかどうか、およびクライアントのキーストアの証明書ラベル名に関する詳細を提供する必要があります。

于 2013-02-18T22:28:56.210 に答える