title: .net client ssl connect to wephsere mq
body: <p>Hi I want to connect webpshere mq .net client.And I dont want to use any environmet variable set in to server or my client pc.</p>
  
  <p>I check but I cant,I also set path and chipper in connection properties but I failed.Can some share .net code sample with ssl connection</p>
  
  <pre><code> connectionProperties.Add(MQC.SSL_CERT_STORE_PROPERTY, SSLPath);
              connectionProperties.Add(MQC.SSL_CIPHER_SPEC_PROPERTY, SSLChipper);
  
            MQEnvironment.SSLCipherSpec = "ECDHE_RSA_AES_256_GCM_SHA384";
              MQEnvironment.SSLKeyRepository = SSLPath;// path is my cer and tab files folder
              MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, ConnectionType);
              MQEnvironment.ConnectionName = HostName;
              MQEnvironment.Channel = channelName;
  
  
              qMgr = new MQQueueManager(QueueManagerName, connectionProperties);
  </code></pre>
  
  <p>I found this topic but they suggest setting environment variable directly
  <a href="https://stackoverflow.com/questions/2663231/net-client-connecting-to-ibm-mq-over-ssl">.NET client connecting to IBM MQ over SSL</a></p>
  
  <p>@Update only want to use amqdmdnet(8.0.0.7) My Final code like that I dont want to set enviroment variable.</p>
  
  <p>string ConnectionName = string.Format("{0}({1})", HostName, Port);</p>
  
  <pre><code> Hashtable connectionProperties = new Hashtable();
  connectionProperties.Add(MQC.CHANNEL_PROPERTY, channelName);
   connectionProperties.Add(MQC.PORT_PROPERTY, Port);
  connectionProperties.Add(MQC.CONNECTION_NAME_PROPERTY, ConnectionName);
          connectionProperties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_MANAGED);
  
  
  connectionProperties.Add(MQC.SSL_CERT_STORE_PROPERTY, @"D:\D\MYcertificates\Client\client_4_certificate"); //without .kdb but folder path
  connectionProperties.Add(MQC.HOST_NAME_PROPERTY, hostName);
  
  connectionProperties.Add(MQC.SSL_CIPHER_SPEC_PROPERTY,"TLS_RSA_WITH_AES_256_GCMSHA384");
  
              qMgr = new MQQueueManager(QueueManagerName, connectionProperties);
  </code></pre>
  
  <p>For these code I got 2538 error.</p>
  
  <p>@Update3</p>
  
  <p>I change my cert_store property and upload to certificate my windows store connectionProperties.Add(MQC.SSL_CERT_STORE_PROPERTY, "*USER");
  that time I pass 2538 error and take 2059 error.In error detail I got this error what ever I send chipperspec property it is not send to server correctly</p>
  
  <p>In my code I sent
  connectionProperties.Add(MQC.SSL_CIPHER_SPEC_PROPERTY, "TLS_RSA_WITH_AES_256_CBC_SHA");</p>
  
  <p>I got error
  The CipherSpec required in the local channel definition is
  'TLS_RSA_WITH_AES_256_CBC_SHA'. The name of the CipherSpec negotiated during
  the SSL handshake is 'TLS_RSA_WITH_AES_128_CBC_SHA'. A code is displayed if the
  name of the negotiated CipherSpec cannot be determined. </p>