public override void OnOpening()
 {
     base.OnOpening();
     if (this.credentialsHandle == null)
     {
         this.credentialsHandle = SecurityUtils.GetCredentialsHandle("Negotiate", this.serverCredential, true);
     }
 }
 public override void OnOpening()
 {
     base.OnOpening();
     if (this.credentialsHandle == null)
     {
         this.credentialsHandle = SecurityUtils.GetCredentialsHandle("Kerberos", null, true);
     }
 }
Example #3
0
 public override void OnOpening()
 {
     base.OnOpening();
     if (this.credentialsHandle == null)
     {
         if (this.BootstrapSecurityBindingElement == null)
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.BootstrapSecurityBindingElementNotSet, this.GetType())));
         }
         this.credentialsHandle    = SecurityUtils.GetCredentialsHandle(this.BootstrapSecurityBindingElement, this.IssuerBindingContext);
         this.ownCredentialsHandle = true;
     }
 }
        public override void OnOpening()
        {
            bool osIsGreaterThanXP = SecurityUtils.IsOsGreaterThanXP();

            base.OnOpening();
            if (this.credentialsHandle == null)
            {
                string packageName;
                if (!this.allowNtlm && !osIsGreaterThanXP)
                {
                    packageName = "Kerberos";
                }
                else
                {
                    packageName = "Negotiate";
                }

                NetworkCredential credential = null;
                if (this.clientCredential != null)
                {
                    credential = this.clientCredential.GetCredential(this.TargetAddress.Uri, packageName);
                }

                // if OS is less than 2k3 !NTLM is not supported, Windows SE 142400
                if (!this.allowNtlm && osIsGreaterThanXP)
                {
                    this.credentialsHandle = SecurityUtils.GetCredentialsHandle(packageName, credential, false, "!NTLM");
                }
                else
                {
                    this.credentialsHandle = SecurityUtils.GetCredentialsHandle(packageName, credential, false);
                }

                this.ownCredentialsHandle = true;
            }
        }