2013-02-06 3 views
0

주제별로 pub/sub 용 채널에 연결하려고합니다. SSL을 지원하는 유일한 모드이기 때문에 비 관리 모드에서 실행됩니다. CIPHER SPECKEY_REPO을 지정한 경우 응용 프로그램과 동일한 디렉토리에 key.kdb이라는 키가 있습니다 (키 저장소에 대한 전체 경로를 시도했지만 그 중 하나가에도 적용되지 않음). 인증서를 사용하기 위해 비밀번호 (암호화 됨)가 포함 된 key.sth이 있습니다. 아래 코드 줄, 적은 연결 문자열 및 기타 중요한 정보입니다.응용 프로그램을 작동시키는 데 문제가 있습니다. SSL을 사용하는 .NET WebsphereMQ (IBM.XMS)

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. 

나는이 설정의 문제점을 파악할 수 없습니다. 어떤 아이디어입니까?

답변

0

오류는 QMgr의 인증서가 클라이언트에 의해 검증되었음을 나타내는 것 같습니다. 즉, KDB 및 STH 파일을 찾았습니다. 이제 클라이언트 측 인증서의 유효성 검사를 시도하고 있습니다. 그건 아마

A) 그것은 QMGR가 클라이언트의 공개 키 (자체 서명) 또는 CA 루트

이없는) 아마도 때문에 라벨
B의 클라이언트 인증서를 찾을 수 없습니다 ... 있음을 의미

일반적으로 this other SO answer.에 설명 된 절차에 따라 TLS 채널 테스트를 확인합니다. SSLCAUTH(OPTIONAL)으로 테스트를 성공적으로 마쳤 으면 내 추측을 확인하는 경향이 있습니다. 그래도 작동하지 않는다면 자체 서명 된 인증서를 사용했는지, QMgr의 KDB에 있는지, 키 스토어를 업데이트 한 후 QMgr에서 REFRESH SECURITY TYPE(SSL)을 실행하는지 여부, 클라이언트의 키 저장소에있는 인증서 레이블 이름을 제공해야합니다 .