/// <summary> /// constructor /// </summary> /// <param name="credential">the client credential contains the user information</param> /// <exception cref="ArgumentNullException">the previousContext must be null</exception> public NlmpClientSecurityContext(NlmpClientCredential credential) { this.credential = credential; // initialize the nlmp client information. this.client = new NlmpClient(new NlmpClientConfig(NlmpVersion.v2)); this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_NTLM; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_REQUEST_TARGET; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_ALWAYS_SIGN; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_VERSION; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_128; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_56; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_UNICODE; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLM_NEGOTIATE_OEM; }
/// <summary> /// constructor /// </summary> /// <param name="credential">the client credential contains the user information</param> /// <exception cref="ArgumentNullException">the previousContext must be null</exception> public NlmpClientSecurityContext(NlmpClientCredential credential) { this.credential = credential; // initialize the nlmp client information. this.client = new NlmpClient(new NlmpClientConfig(NlmpVersion.v2)); this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_NTLM; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_REQUEST_TARGET; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_ALWAYS_SIGN; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_VERSION; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_128; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_56; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_UNICODE; // turn on seal and sign this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_SEAL; this.client.Context.ClientConfigFlags |= NegotiateTypes.NTLMSSP_NEGOTIATE_SIGN; }