public MQPlainSocket(NmqiEnvironment env, MQTCPConnection conn, Socket socket) : base(env) { base.TrConstructor("%Z% %W% %I% %E% %U%"); this.stream = socket; this.env = env; this.owningConnection = conn; }
internal MQPeerNameMatching(NmqiEnvironment env, MQTCPConnection conn, string DN, bool validate) : base(env) { this.DC = new List <string>(); this.OU = new List <string>(); base.TrConstructor("%Z% %W% %I% %E% %U%"); this.env = env; this.owningConnection = conn; this.originalName = DN; this.matcher = validate; this.ParseDN(DN); }
public MQEncryptedSocket(NmqiEnvironment env, MQTCPConnection conn, Socket socket, MQChannelDefinition mqcd, MQSSLConfigOptions sslConfigOptions) : base(env) { this.keyStore = "*SYSTEM"; this.sslProtocol = SslProtocols.Tls; try { base.TrConstructor("%Z% %W% %I% %E% %U%"); this.env = env; this.owningConnection = conn; this.clientCertName = "ibmwebspheremq" + Environment.UserName.ToLower(); this.RetrieveAndValidateSSLParams(mqcd, sslConfigOptions); this.client = new TcpClient(); this.client.Client = socket; this.MakeSecuredConnection(); } catch (Exception) { throw; } }
private MQFAPConnection CreateAndConnectConnection(MQChannelDefinition mqcd, MQSSLConfigOptions sslConfigOptions, MQConnectionSecurityParameters mqcsp, MQFAP fap, string qMgrName, int connectOptions, int maxFapLevel) { MQFAPConnection connection; uint method = 0x59a; this.TrEntry(method, new object[] { mqcsp, fap, qMgrName, connectOptions, maxFapLevel }); try { if (mqcd == null) { CommonServices.SetValidInserts(); CommonServices.CommentInsert1 = "No Channel Definition to establish connection"; base.FFST("%Z% %W% %I% %E% %U%", "%C%", method, 1, 0x20009519, 0); NmqiException exception = new NmqiException(base.env, -1, null, 2, 0x893, null); throw exception; } if (mqcd.TransportType == 2) { connection = new MQTCPConnection(base.env, this, fap, mqcd, sslConfigOptions, this.GetConnectOptions(connectOptions)); } else { string[] inserts = new string[3]; inserts[2] = mqcd.TransportType.ToString(); NmqiException exception2 = new NmqiException(base.env, 0x26bb, inserts, 2, 0x80b, null); throw exception2; } this.connectionsLock.Acquire(); this.connectingConnections++; try { MQChannelDefinition definition = connection.ClientConn.Clone(); definition.Version = 11; connection.NegotiatedChannel = definition; } catch (Exception exception3) { base.TrException(method, exception3, 1); NmqiException exception4 = new NmqiException(base.env, -1, null, 2, 0x8e5, null); throw exception4; } connection.InitSecurityExits(); try { connection.Connect(mqcsp); } catch (Exception exception5) { base.TrException(method, exception5, 2); connection = null; throw exception5; } } finally { this.connectingConnections--; this.connectionsLock.Release(); this.connectionsLock.PulseAll(); base.TrExit(method); } return(connection); }