Encryption 如何在c#for IBM WebSphere MQ中添加消息级安全性

Encryption 如何在c#for IBM WebSphere MQ中添加消息级安全性,encryption,configuration,ibm-mq,websphere-mq-ams,Encryption,Configuration,Ibm Mq,Websphere Mq Ams,感谢您的帮助/建议 提前谢谢 遵循中概述的步骤。要从C#使用AMS,您将通过C客户端访问AMS功能,因此设置将是相同的。感谢Morag Hughson的帮助。您使(AMS)与C#一起工作了吗? Steps I have done : 1) In the Server, I have installed IBM WebSphere MQ v7.5.0.2 with AMS component enabled. 2) In the Server, i have configur

感谢您的帮助/建议


提前谢谢

遵循中概述的步骤。要从C#使用AMS,您将通过C客户端访问AMS功能,因此设置将是相同的。

感谢Morag Hughson的帮助。您使(AMS)与C#一起工作了吗? Steps I have done : 1) In the Server, I have installed IBM WebSphere MQ v7.5.0.2 with AMS component enabled. 2) In the Server, i have configured the below : a) Created New Queue Manager and Queue. b) Created Listener.TCP c) Created required Server-Connection Channel and Client-Connection Channel. d) Configured Server-Connection Channel to accept SSL(TLS_RSA_WITH_AES_128_CBC_SHA256). e) Created the Self-Signed Certificate at Client and Server. f) Using the below c# code, i am able to connect to the Remote Queue Manager using CCDT. g) I am able to connect successfully to the Remote Queue Manager (AND) I am able to put a message to the queue. h) I am able to Browse the message in the WebSphere MQ Explorer in Server. i) I believe now my Transport Level Security is done. j) But now i need to enable Message Level Security to all the incoming/outgoing messages from that Server-Connection Channel which is configured with SSL. 3) I have the below few questions, please help to clarify : a) How and where to configure the keystore.conf using .net environment ? b) How and where to configure the Message Level Security for every message that is incoming/outgoing from the SSL Connection configured channel ? c) How and where to configure Online Certificate Status Protocol (OCSP) d) How and where to configure Certificate Revocation List (CRL) for certificates validation
public void TestSSLConnectionWithCCDT()
        {
            try
            {
                Environment.SetEnvironmentVariable(MQCHLLIB, @C:\Program Files (x86)\IBM\WebSphere MQ\ssl);
                Environment.SetEnvironmentVariable(MQCHLTAB, AMQCLCHL.TAB);

                Hashtable props = new Hashtable();
                props.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
                props.Add(MQC.SSL_CERT_STORE_PROPERTY, sslKeyRepository);
                MQQueueManager qMgr = new MQQueueManager(QM1, props);
                MQQueue queue1 = qMgr.AccessQueue(Q1, MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING);
                MQMessage msg = new MQMessage();
                msg.WriteUTF(Test Message);
                queue1.Put(msg);
            }
            catch (MQException ex)
            {
                Console.WriteLine(A WebSphere MQ error occurred: {0}, ex.ToString());
            }
                catch (System.Exception ex)
            {
                Console.WriteLine(A System error occurred: {0}, ex.ToString());
            }
        }