375 references to SecurityUtils
System.ServiceModel (375)
System\ServiceModel\Channels\HttpChannelFactory.cs (2)
381ReadOnlyCollection<IAuthorizationPolicy> spnPolicies = SecurityUtils.CreatePrincipalNameAuthorizationPolicies(spn); 613return SecurityUtils.AppendWindowsAuthenticationInfo(inputString, credential, authenticationLevel, impersonationLevel);
System\ServiceModel\Channels\HttpChannelHelpers.cs (1)
3808if (!SecurityUtils.IsDefaultNetworkCredential(credential))
System\ServiceModel\Channels\HttpChannelListener.cs (4)
384this.identity = SecurityUtils.CreateWindowsIdentity(); 481SecurityUtils.CloseTokenAuthenticatorIfRequired(this.userNameTokenAuthenticator, timeout); 487SecurityUtils.AbortTokenAuthenticatorIfRequired(this.userNameTokenAuthenticator); 652SecurityUtils.ValidateAnonymityConstraint(identity, false);
System\ServiceModel\Channels\HttpsChannelFactory.cs (6)
84ReadOnlyCollection<IAuthorizationPolicy> authorizationPolicies = SecurityUtils.NonValidatingX509Authenticator.ValidateToken(token); 193SecurityUtils.OpenTokenProviderIfRequired(certificateProvider, timeout); 228SecurityUtils.AbortTokenProviderIfRequired(webRequestCertificateProvider); 310SecurityUtils.CloseTokenProviderIfRequired(this.certificateProvider, timeout); 318SecurityUtils.AbortTokenProviderIfRequired(this.certificateProvider); 547SecurityUtils.AbortTokenProviderIfRequired(this.certificateProvider);
System\ServiceModel\Channels\HttpsChannelListener.cs (9)
195identity = SecurityUtils.CloneWindowsIdentityIfNecessary(identity, SecurityUtils.AuthTypeCertMap); 196authType = SecurityUtils.AuthTypeCertMap; 219WriteAuditEvent(AuditLevel.Failure, (certificate != null) ? SecurityUtils.GetCertificateId(certificate) : String.Empty, exception); 226WriteAuditEvent(AuditLevel.Success, (certificate != null) ? SecurityUtils.GetCertificateId(certificate) : String.Empty, null); 280WriteAuditEvent(AuditLevel.Failure, (certificateEx != null) ? SecurityUtils.GetCertificateId(certificateEx) : String.Empty, exception); 287WriteAuditEvent(AuditLevel.Success, (certificateEx != null) ? SecurityUtils.GetCertificateId(certificateEx) : String.Empty, null); 339WriteAuditEvent(AuditLevel.Failure, (clientCertificate != null) ? SecurityUtils.GetCertificateId(clientCertificate) : String.Empty, exception); 387WriteAuditEvent(AuditLevel.Failure, (certificateEx != null) ? SecurityUtils.GetCertificateId(certificateEx) : String.Empty, exception);
System\ServiceModel\Channels\MsmqChannelListenerBase.cs (3)
92SecurityUtils.OpenTokenAuthenticatorIfRequired(this.x509SecurityTokenAuthenticator, timeout); 252primaryIdentity = SecurityUtils.GetCertificateId(certificate); 256primaryIdentity = SecurityUtils.GetIdentityName(wsid);
System\ServiceModel\Channels\SecurityChannelFactory.cs (3)
352faultException = SecurityUtils.CreateSecurityFaultException(fault); 392if ((SecurityUtils.IsChannelBindingDisabled) || (!SecurityUtils.IsSecurityBindingSuitableForChannelBinding(this.SecurityProtocolFactory.SecurityBindingElement as TransportSecurityBindingElement)))
System\ServiceModel\Channels\SecurityChannelListener.cs (6)
37extendedProtectionPolicyHasSupport = SecurityUtils.IsSecurityBindingSuitableForChannelBinding(bindingElement as TransportSecurityBindingElement); 384if (SecurityUtils.IsChannelBindingDisabled || !this.extendedProtectionPolicyHasSupport || (cbp == null && extendedProtectionPolicy.ProtectionScenario != ProtectionScenario.TrustedProxy)) 391if ((SecurityUtils.IsChannelBindingDisabled) || (!this.extendedProtectionPolicyHasSupport)) 1104MessageFault fault = SecurityUtils.CreateSecurityMessageFault(e, this.SecurityProtocol.SecurityProtocolFactory.StandardsManager); 1285MessageFault fault = SecurityUtils.CreateSecurityMessageFault(e, this.SecurityProtocol.SecurityProtocolFactory.StandardsManager); 1678MessageFault fault = SecurityUtils.CreateSecurityMessageFault(e, this.StandardsManager);
System\ServiceModel\Channels\SessionConnectionReader.cs (1)
657return SecurityUtils.GetIdentityNamesFromContext(
System\ServiceModel\Channels\SingletonConnectionReader.cs (1)
883return SecurityUtils.GetIdentityNamesFromContext(
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (32)
114this.identity = SecurityUtils.GetServiceCertificateIdentity(this.serverCertificate); 258SecurityUtils.AbortTokenAuthenticatorIfRequired(this.clientCertificateAuthenticator); 267SecurityUtils.CloseTokenAuthenticatorIfRequired(this.clientCertificateAuthenticator, timeout); 274return SecurityUtils.BeginCloseTokenAuthenticatorIfRequired(this.clientCertificateAuthenticator, timeout, callback, state); 279SecurityUtils.EndCloseTokenAuthenticatorIfRequired(result); 288SecurityUtils.AbortTokenProviderIfRequired(this.serverTokenProvider); 301SecurityUtils.ResetCertificate(this.serverCertificate); 310SecurityUtils.OpenTokenAuthenticatorIfRequired(this.ClientCertificateAuthenticator, timeoutHelper.RemainingTime()); 314SecurityUtils.OpenTokenProviderIfRequired(this.serverTokenProvider, timeoutHelper.RemainingTime()); 317SecurityUtils.CloseTokenProviderIfRequired(this.serverTokenProvider, timeoutHelper.RemainingTime()); 352IAsyncResult result = SecurityUtils.BeginOpenTokenAuthenticatorIfRequired(parent.ClientCertificateAuthenticator, 373SecurityUtils.EndOpenTokenAuthenticatorIfRequired(result); 381IAsyncResult openTokenProviderResult = SecurityUtils.BeginOpenTokenProviderIfRequired( 394SecurityUtils.EndOpenTokenProviderIfRequired(result); 414SecurityUtils.BeginCloseTokenProviderIfRequired(parent.serverTokenProvider, timeoutHelper.RemainingTime(), 427SecurityUtils.EndCloseTokenProviderIfRequired(result); 615if (SecurityUtils.ShouldValidateSslCipherStrength()) 617SecurityUtils.ValidateSslCipherStrength(sslStream.CipherStrength); 686ReadOnlyCollection<IAuthorizationPolicy> authorizationPolicies = SecurityUtils.NonValidatingX509Authenticator.ValidateToken(token); 724if (SecurityUtils.ShouldValidateSslCipherStrength()) 726SecurityUtils.ValidateSslCipherStrength(sslStream.CipherStrength); 852SecurityUtils.OpenTokenProviderIfRequired(this.clientCertificateProvider, timeoutHelper.RemainingTime()); 883SecurityUtils.CloseTokenProviderIfRequired(this.clientCertificateProvider, timeoutHelper.RemainingTime()); 942if (SecurityUtils.ShouldValidateSslCipherStrength()) 944SecurityUtils.ValidateSslCipherStrength(sslStream.CipherStrength); 1030if (SecurityUtils.ShouldValidateSslCipherStrength()) 1032SecurityUtils.ValidateSslCipherStrength(sslStream.CipherStrength); 1104IAsyncResult openTokenProviderResult = SecurityUtils.BeginOpenTokenProviderIfRequired( 1117SecurityUtils.EndOpenTokenProviderIfRequired(result); 1275IAsyncResult closeTokenProviderResult = SecurityUtils.BeginCloseTokenProviderIfRequired( 1283SecurityUtils.EndCloseTokenProviderIfRequired(closeTokenProviderResult); 1328SecurityUtils.EndCloseTokenProviderIfRequired(result);
System\ServiceModel\Channels\TransportSecurityHelpers.cs (11)
54value = SecurityUtils.GetSpnFromIdentity(identity, target); 58value = SecurityUtils.GetSpnFromTarget(target); 99value = SecurityUtils.GetSpnFromIdentity(identity, target); 103value = SecurityUtils.GetSpnFromTarget(target); 281SecurityUtils.OpenTokenProviderIfRequired(tokenProvider, timeoutHelper.RemainingTime()); 296SecurityUtils.AbortTokenProviderIfRequired(tokenProvider); 299SecurityUtils.CloseTokenProviderIfRequired(tokenProvider, timeoutHelper.RemainingTime()); 327SecurityUtils.FixNetworkCredential(ref credential); 492SecurityUtils.PrepareNetworkCredential(); 587SecurityUtils.PrepareNetworkCredential(); 673SecurityUtils.FixNetworkCredential(ref this.credential);
System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (13)
87this.identity = SecurityUtils.CreateWindowsIdentity(this.serverCredential); 247SecurityUtils.ValidateAnonymityConstraint(remoteIdentity, false); 345SecurityUtils.OpenTokenProviderIfRequired(this.clientTokenProvider, timeoutHelper.RemainingTime()); 374SecurityUtils.CloseTokenProviderIfRequired(this.clientTokenProvider, timeoutHelper.RemainingTime()); 401ReadOnlyCollection<IAuthorizationPolicy> authorizationPolicies = SecurityUtils.CreatePrincipalNameAuthorizationPolicies(principalName); 463targetName = SecurityUtils.GetSpnFromIdentity(identity, this.RemoteAddress); 467targetName = SecurityUtils.GetSpnFromTarget(this.RemoteAddress); 481string primaryIdentity = SecurityUtils.GetIdentityNamesFromContext(remoteSecurity.ServiceSecurityContext.AuthorizationContext); 572IAsyncResult openTokenProviderResult = SecurityUtils.BeginOpenTokenProviderIfRequired( 585SecurityUtils.EndOpenTokenProviderIfRequired(result); 736IAsyncResult closeTokenProviderResult = SecurityUtils.BeginCloseTokenProviderIfRequired( 744SecurityUtils.EndCloseTokenProviderIfRequired(closeTokenProviderResult); 789SecurityUtils.EndCloseTokenProviderIfRequired(result);
System\ServiceModel\ComIntegration\ChannelCredentials.cs (1)
69System.ServiceModel.Security.SecurityUtils.PrepareNetworkCredential();
System\ServiceModel\Configuration\IssuedTokenServiceElement.cs (1)
184issuedToken.KnownCertificates.Add(SecurityUtils.GetCertificateFromStore(src.StoreName, src.StoreLocation, src.X509FindType, src.FindValue, null));
System\ServiceModel\Description\ConfigLoader.cs (1)
135SecurityUtils.ResetAllCertificates(collection);
System\ServiceModel\Dispatcher\AuthenticationBehavior.cs (4)
81primaryIdentity = SecurityUtils.GetIdentityNamesFromContext(authContext); 85primaryIdentity = SecurityUtils.AnonymousIdentity.Name; 113primaryIdentity = SecurityUtils.GetIdentityNamesFromContext(authContext); 117primaryIdentity = SecurityUtils.AnonymousIdentity.Name;
System\ServiceModel\Dispatcher\AuthorizationBehavior.cs (4)
87primaryIdentity = SecurityUtils.GetIdentityNamesFromContext(authContext); 92primaryIdentity = SecurityUtils.AnonymousIdentity.Name; 121primaryIdentity = SecurityUtils.GetIdentityNamesFromContext(authContext); 126primaryIdentity = SecurityUtils.AnonymousIdentity.Name;
System\ServiceModel\Dispatcher\SecurityImpersonationBehavior.cs (5)
167if (securityContext.AuthorizationContext.Properties.TryGetValue(SecurityUtils.Principal, out customPrincipal) && customPrincipal is IPrincipal) 239using (WindowsIdentity windowsIdentity = new WindowsIdentity(fullyQualifiedDomainName, SecurityUtils.AuthTypeKerberos)) 262this.suppressAuditFailure, rpc.Operation.Name, SecurityUtils.GetIdentityNamesFromContext(securityContext.AuthorizationContext)); 283primaryIdentity = SecurityUtils.GetIdentityNamesFromContext(securityContext.AuthorizationContext); 285primaryIdentity = SecurityUtils.AnonymousIdentity.Name;
System\ServiceModel\Security\AcceleratedTokenAuthenticator.cs (6)
153securityChannelListener.SendUnsecuredFaults = !SecurityUtils.IsCompositeDuplexBinding(context); 157this.shouldMatchRstWithEndpointFilter = SecurityUtils.ShouldMatchRstWithEndpointFilter(this.bootstrapSecurityBindingElement); 212SecurityUtils.MatchRstWithEndpointFilter(request, this.EndpointFilterTable, this.ListenUri); 220UniqueId contextId = SecurityUtils.GenerateUniqueId(); 221string id = SecurityUtils.GenerateId(); 236SecurityUtils.ErasePasswordInUsernameTokenIfPresent(serviceToken.BootstrapMessageProperty);
System\ServiceModel\Security\AcceleratedTokenProvider.cs (1)
135this.credentialsHandle = SecurityUtils.GetCredentialsHandle(this.BootstrapSecurityBindingElement, this.IssuerBindingContext);
System\ServiceModel\Security\AcceptorSessionSymmetricMessageSecurityProtocol.cs (3)
98string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(this.sessionStandardsManager.MessageSecurityVersion.SecureConversationVersion); 102DerivedKeySecurityToken.DefaultNonceLength, token, this.Factory.SecurityTokenParameters.CreateKeyIdentifierClause(token, SecurityTokenReferenceStyle.External), derivationAlgorithm, SecurityUtils.GenerateId()); 106DerivedKeySecurityToken.DefaultNonceLength, token, this.Factory.SecurityTokenParameters.CreateKeyIdentifierClause(token, SecurityTokenReferenceStyle.External), derivationAlgorithm, SecurityUtils.GenerateId());
System\ServiceModel\Security\AcceptorSessionSymmetricTransportSecurityProtocol.cs (1)
109securityHeader.Process(timeoutHelper.RemainingTime(), SecurityUtils.GetChannelBindingFromMessage(message), this.Factory.ExtendedProtectionPolicy);
System\ServiceModel\Security\AsymmetricSecurityProtocol.cs (10)
80SecurityUtils.OpenTokenProviderIfRequired(this.initiatorCryptoTokenProvider, timeoutHelper.RemainingTime()); 89SecurityUtils.OpenTokenProviderIfRequired(this.initiatorAsymmetricTokenProvider, timeoutHelper.RemainingTime()); 99SecurityUtils.OpenTokenAuthenticatorIfRequired(this.initiatorAsymmetricTokenAuthenticator, timeoutHelper.RemainingTime()); 110SecurityUtils.AbortTokenProviderIfRequired(this.initiatorCryptoTokenProvider); 114SecurityUtils.AbortTokenProviderIfRequired(this.initiatorAsymmetricTokenProvider); 118SecurityUtils.AbortTokenAuthenticatorIfRequired(this.initiatorAsymmetricTokenAuthenticator); 131SecurityUtils.CloseTokenProviderIfRequired(this.initiatorCryptoTokenProvider, timeoutHelper.RemainingTime()); 135SecurityUtils.CloseTokenProviderIfRequired(this.initiatorAsymmetricTokenProvider, timeoutHelper.RemainingTime()); 139SecurityUtils.CloseTokenAuthenticatorIfRequired(this.initiatorAsymmetricTokenAuthenticator, timeoutHelper.RemainingTime()); 260if (!SecurityUtils.HasSymmetricSecurityKey(encryptionToken))
System\ServiceModel\Security\AsymmetricSecurityProtocolFactory.cs (4)
158SecurityUtils.CloseTokenProviderIfRequired(this.recipientAsymmetricTokenProvider, timeoutHelper.RemainingTime()); 162SecurityUtils.CloseTokenAuthenticatorIfRequired(this.recipientCryptoTokenAuthenticator, timeoutHelper.RemainingTime()); 174SecurityUtils.AbortTokenProviderIfRequired(this.recipientAsymmetricTokenProvider); 178SecurityUtils.AbortTokenAuthenticatorIfRequired(this.recipientCryptoTokenAuthenticator);
System\ServiceModel\Security\ClientCredentialsSecurityTokenManager.cs (13)
58return SecurityUtils.GetSpnFromIdentity(identity, targetAddress); 76SecurityUtils.OpenTokenProviderIfRequired(sspiTokenProvider, TimeSpan.Zero); 78SecurityUtils.AbortTokenProviderIfRequired(sspiTokenProvider); 113spnegoTokenProvider.StandardsManager = SecurityUtils.CreateSecurityStandardsManager(initiatorRequirement, this); 210tlsnegoTokenProvider.StandardsManager = SecurityUtils.CreateSecurityStandardsManager(initiatorRequirement, this); 235sessionTokenProvider.BootstrapSecurityBindingElement = SecurityUtils.GetIssuerSecurityBindingElement(initiatorRequirement); 240sessionTokenProvider.StandardsManager = SecurityUtils.CreateSecurityStandardsManager(initiatorRequirement, this); 267acceleratedTokenProvider.BootstrapSecurityBindingElement = SecurityUtils.GetIssuerSecurityBindingElement(initiatorRequirement); 274acceleratedTokenProvider.StandardsManager = SecurityUtils.CreateSecurityStandardsManager(initiatorRequirement, this); 578new KerberosSecurityTokenProvider(spn, parent.Windows.AllowedImpersonationLevel, SecurityUtils.GetNetworkCredentialOrDefault(parent.Windows.ClientCredential)), 593result = new SspiSecurityTokenProvider(SecurityUtils.GetNetworkCredentialOrDefault(parent.HttpDigest.ClientCredential), true, parent.HttpDigest.AllowedImpersonationLevel); 600result = new SspiSecurityTokenProvider(SecurityUtils.GetNetworkCredentialOrDefault(parent.Windows.ClientCredential), 824this.credentialsHandle = SecurityUtils.GetCredentialsHandle("Kerberos", this.innerProvider.NetworkCredential, false);
System\ServiceModel\Security\EncryptedData.cs (1)
59this.cipherText = SecurityUtils.ReadContentAsBase64(reader, maxBufferSize);
System\ServiceModel\Security\HttpDigestClientCredential.cs (1)
25this.digestCredentials = SecurityUtils.GetNetworkCredentialsCopy(other.digestCredentials);
System\ServiceModel\Security\InitiatorSessionSymmetricMessageSecurityProtocol.cs (3)
102string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(this.sessionStandardsManager.MessageSecurityVersion.SecureConversationVersion); 106DerivedKeySecurityToken.DefaultNonceLength, token, this.Factory.SecurityTokenParameters.CreateKeyIdentifierClause(token, SecurityTokenReferenceStyle.Internal), derivationAlgorithm, SecurityUtils.GenerateId()); 109null, DerivedKeySecurityToken.DefaultNonceLength, token, this.Factory.SecurityTokenParameters.CreateKeyIdentifierClause(token, SecurityTokenReferenceStyle.Internal), derivationAlgorithm, SecurityUtils.GenerateId());
System\ServiceModel\Security\InitiatorSessionSymmetricTransportSecurityProtocol.cs (2)
81string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(this.Factory.MessageSecurityVersion.SecureConversationVersion); 84this.Factory.OutgoingAlgorithmSuite.GetSignatureKeyDerivationLength(token, this.Factory.MessageSecurityVersion.SecureConversationVersion), null, DerivedKeySecurityToken.DefaultNonceLength, token, this.Factory.SecurityTokenParameters.CreateKeyIdentifierClause(token, SecurityTokenReferenceStyle.Internal), derivationAlgorithm, SecurityUtils.GenerateId());
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (3)
307if (serviceToken.ValidTo.ToUniversalTime() >= SecurityUtils.MaxUtcDateTime) 347SecurityUtils.ThrowIfNegotiationFault(message, target); 578negotiationState.Context = SecurityUtils.GenerateId();
System\ServiceModel\Security\MessageSecurityProtocol.cs (2)
433securityHeader.Process(timeoutHelper.RemainingTime(), SecurityUtils.GetChannelBindingFromMessage(message), this.factory.ExtendedProtectionPolicy); 446SecurityUtils.EnsureExpectedSymmetricMatch(securityHeader.SignatureToken, securityHeader.EncryptionToken, message);
System\ServiceModel\Security\NegotiationTokenAuthenticatorState.cs (1)
67return SecurityUtils.GetIdentityNamesFromPolicies(this.serviceToken.AuthorizationPolicies);
System\ServiceModel\Security\PeerCredential.cs (1)
106this.certificate = SecurityUtils.GetCertificateFromStore(storeName, storeLocation, findType, findValue, null);
System\ServiceModel\Security\ReceiveSecurityHeader.cs (3)
527if (encryptionToken != null && !SecurityUtils.HasSymmetricSecurityKey(encryptionToken)) 2116resolved = SecurityUtils.TryCreateKeyFromIntrinsicKeyClause(keyIdentifierClause, this, out key); 2169token = SecurityUtils.CreateTokenFromEncryptedKeyClause(keyClause, unwrappingToken);
System\ServiceModel\Security\RequestSecurityToken.cs (3)
62: this(SecurityUtils.CreateSecurityStandardsManager(messageSecurityVersion, securityTokenSerializer)) 76: this(SecurityUtils.CreateSecurityStandardsManager(messageSecurityVersion, securityTokenSerializer), 558return CreateFrom(SecurityUtils.CreateSecurityStandardsManager(messageSecurityVersion, securityTokenSerializer), reader);
System\ServiceModel\Security\RequestSecurityTokenResponse.cs (5)
68: this(SecurityUtils.CreateSecurityStandardsManager(messageSecurityVersion, securityTokenSerializer)) 109: this(SecurityUtils.CreateSecurityStandardsManager(messageSecurityVersion, securityTokenSerializer), 132effectiveTime = SecurityUtils.MinUtcDateTime; 133expirationTime = SecurityUtils.MaxUtcDateTime; 635return CreateFrom(SecurityUtils.CreateSecurityStandardsManager(messageSecurityVersion, securityTokenSerializer), reader);
System\ServiceModel\Security\SctClaimSerializer.cs (6)
405if (authContext.Properties.TryGetValue(SecurityUtils.Identities, out obj)) 422if (identity != null && identity != SecurityUtils.AnonymousIdentity) 438(wid.Owner != SecurityUtils.AdministratorsSid && self.Groups.Contains(SecurityUtils.AdministratorsSid))) 485if (identity != null && identity != SecurityUtils.AnonymousIdentity) 515identity = SecurityUtils.CreateIdentity(name, authenticationType ?? String.Empty);
System\ServiceModel\Security\SecurityAlgorithmSuite.cs (9)
251string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(version); 252if (SecurityUtils.IsSupportedAlgorithm(derivationAlgorithm, token)) 263string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(version); 264if (SecurityUtils.IsSupportedAlgorithm(derivationAlgorithm, token)) 280if (SecurityUtils.IsSupportedAlgorithm(this.DefaultSymmetricKeyWrapAlgorithm, token)) 326string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(version); 327if (SecurityUtils.IsSupportedAlgorithm(derivationAlgorithm, token)) 338string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(version); 339if (SecurityUtils.IsSupportedAlgorithm(derivationAlgorithm, token))
System\ServiceModel\Security\SecurityContextTokenCache.cs (2)
59if ( !SecurityUtils.IsCurrentlyTimeEffective( token.ValidFrom, token.ValidTo, this.clockSkew ) ) 67if ( !SecurityUtils.IsCurrentlyTimeEffective( token.KeyEffectiveTime, token.KeyExpirationTime, this.clockSkew ) )
System\ServiceModel\Security\SecurityHeaderTokenResolver.cs (5)
131if (SecurityUtils.TryCreateKeyFromIntrinsicKeyClause(keyIdentifierClause, this, out securityKey)) 191resolvedToken = SecurityUtils.CreateTokenFromEncryptedKeyClause(keyClause, unwrappingToken); 204if (SecurityUtils.GetSecurityKey<SymmetricSecurityKey>(resolvedToken) == null) 235string psha1Algorithm = SecurityUtils.GetKeyDerivationAlgorithm(this.securityHeader.StandardsManager.MessageSecurityVersion.SecureConversationVersion); 237resolvedToken = new DerivedKeySecurityToken(-1, 0, derivationLength, null, derivationNonce, resolvedToken, keyIdentifierClause, psha1Algorithm, SecurityUtils.GenerateId());
System\ServiceModel\Security\SecurityProtocol.cs (9)
342SecurityUtils.OpenTokenProviderIfRequired(spec.TokenProvider, timeoutHelper.RemainingTime()); 415SecurityUtils.OpenTokenProviderIfRequired(tokenProviderSpec.TokenProvider, timeoutHelper.RemainingTime()); 451SecurityUtils.AbortTokenProviderIfRequired(spec.TokenProvider); 458SecurityUtils.AbortTokenProviderIfRequired(spec.TokenProvider); 471SecurityUtils.CloseTokenProviderIfRequired(spec.TokenProvider, timeoutHelper.RemainingTime()); 478SecurityUtils.CloseTokenProviderIfRequired(spec.TokenProvider, timeoutHelper.RemainingTime()); 813SecurityUtils.GetIdentityNamesFromContext(verifiedMessage.Properties.Security.ServiceSecurityContext.AuthorizationContext)); 836primaryIdentity = SecurityUtils.GetIdentityNamesFromContext(security.ServiceSecurityContext.AuthorizationContext); 838primaryIdentity = SecurityUtils.AnonymousIdentity.Name;
System\ServiceModel\Security\SecurityProtocolFactory.cs (8)
678SecurityUtils.AbortTokenAuthenticatorIfRequired(spec.TokenAuthenticator); 685SecurityUtils.AbortTokenAuthenticatorIfRequired(spec.TokenAuthenticator); 698SecurityUtils.CloseTokenAuthenticatorIfRequired(spec.TokenAuthenticator, timeoutHelper.RemainingTime()); 705SecurityUtils.CloseTokenAuthenticatorIfRequired(spec.TokenAuthenticator, timeoutHelper.RemainingTime()); 841SecurityUtils.OpenTokenAuthenticatorIfRequired(spec.TokenAuthenticator, timeoutHelper.RemainingTime()); 1034SecurityUtils.OpenTokenAuthenticatorIfRequired(tokenAuthenticatorSpec.TokenAuthenticator, timeoutHelper.RemainingTime()); 1132SecurityUtils.OpenTokenAuthenticatorIfRequired(authenticator, timeout); 1144SecurityUtils.OpenTokenProviderIfRequired(provider, timeout);
System\ServiceModel\Security\SecuritySessionClientSettings.cs (14)
635SecurityUtils.OpenTokenProviderIfRequired(this.sessionTokenProvider, timeoutHelper.RemainingTime()); 1138if (SecurityUtils.IsSecurityFault(fault, this.settings.sessionProtocolFactory.StandardsManager)) 1140faultException = SecurityUtils.CreateSecurityFaultException(fault); 1347SecurityUtils.AbortTokenProviderIfRequired(this.sessionTokenProvider); 1363SecurityUtils.CloseTokenProviderIfRequired(this.sessionTokenProvider, timeoutHelper.RemainingTime()); 1768IAsyncResult result = SecurityUtils.BeginCloseTokenProviderIfRequired(this.channel.sessionTokenProvider, timeoutHelper.RemainingTime(), closeTokenProviderCallback, this); 1773SecurityUtils.EndCloseTokenProviderIfRequired(result); 1800SecurityUtils.EndCloseTokenProviderIfRequired(result); 1951IAsyncResult result = SecurityUtils.BeginOpenTokenProviderIfRequired(this.sessionChannel.sessionTokenProvider, timeoutHelper.RemainingTime(), openTokenProviderCallback, this); 1956SecurityUtils.EndOpenTokenProviderIfRequired(result); 1975SecurityUtils.EndOpenTokenProviderIfRequired(result); 2734Claim identityClaim = SecurityUtils.GetPrimaryIdentityClaim(((GenericXmlSecurityToken)sessionToken).AuthorizationPolicies); 2911if (SecurityUtils.IsSecurityFault(fault, this.Settings.standardsManager)) 2913faultException = SecurityUtils.CreateSecurityFaultException(fault);
System\ServiceModel\Security\SecuritySessionSecurityTokenAuthenticator.cs (9)
575Claim identityClaim = SecurityUtils.GetPrimaryIdentityClaim(authorizationPolicies); 702newToken = new SecurityContextSecurityToken(currentToken, SecurityUtils.GenerateId(), proofKey, 703SecurityUtils.GenerateUniqueId(), keyEffectiveTime, keyExpirationTime, authorizationPolicies); 707UniqueId contextId = SecurityUtils.GenerateUniqueId(); 708string id = SecurityUtils.GenerateId(); 716SecurityUtils.ErasePasswordInUsernameTokenIfPresent(newToken.BootstrapMessageProperty); 921SecurityUtils.MatchRstWithEndpointFilter(request, this.endpointFilterTable, this.listenUri); 1131securityChannelListener.SendUnsecuredFaults = !SecurityUtils.IsCompositeDuplexBinding(context); 1135this.shouldMatchRstWithEndpointFilter = SecurityUtils.ShouldMatchRstWithEndpointFilter(this.bootstrapSecurityBindingElement);
System\ServiceModel\Security\SecuritySessionSecurityTokenProvider.cs (2)
335this.credentialsHandle = SecurityUtils.GetCredentialsHandle(this.bootstrapSecurityBindingElement, this.issuerBindingContext); 794SecurityUtils.ThrowIfNegotiationFault(message, target);
System\ServiceModel\Security\SecuritySessionServerSettings.cs (6)
460SecurityUtils.CloseTokenAuthenticatorIfRequired(this.sessionTokenAuthenticator, timeoutHelper.RemainingTime()); 476SecurityUtils.AbortTokenAuthenticatorIfRequired(this.sessionTokenAuthenticator); 557SecurityUtils.OpenTokenAuthenticatorIfRequired(this.sessionTokenAuthenticator, timeoutHelper.RemainingTime()); 1698MessageFault fault = SecurityUtils.CreateSecurityMessageFault(e, this.securityProtocol.SecurityProtocolFactory.StandardsManager); 2503Claim identityClaim = SecurityUtils.GetPrimaryIdentityClaim(sessionToken.AuthorizationPolicies); 4709MessageFault fault = SecurityUtils.CreateSecurityContextNotFoundFault(this.standardsManager, message.Headers.Action);
System\ServiceModel\Security\SecurityUtils.cs (22)
316return ((Environment.OSVersion.Version.Major >= SecurityUtils.XPMajorNumber && Environment.OSVersion.Version.Minor > SecurityUtils.XPMinorNumber) || 317Environment.OSVersion.Version.Major > SecurityUtils.XPMajorNumber); 363anonymousIdentity = SecurityUtils.CreateIdentity(String.Empty); 419return SecurityUtils.CreateWindowsIdentity(); 462return SecurityUtils.CloneWindowsIdentityIfNecessary(wid, null); 591SymmetricSecurityKey c1 = SecurityUtils.GetSecurityKey<SymmetricSecurityKey>(t1); 592SymmetricSecurityKey c2 = SecurityUtils.GetSecurityKey<SymmetricSecurityKey>(t2); 601SymmetricSecurityKey securityKey = SecurityUtils.GetSecurityKey<SymmetricSecurityKey>(token); 614SymmetricSecurityKey securityKey = SecurityUtils.GetSecurityKey<SymmetricSecurityKey>(token); 719SymmetricSecurityKey symmetricSecurityKey = SecurityUtils.GetSecurityKey<SymmetricSecurityKey>(tokenToDerive); 987policies.Add(new UnconditionalPolicy(SecurityUtils.CreateIdentity(principalName), new DefaultClaimSet(ClaimSet.Anonymous, claims))); 1033if (authContext.Properties.TryGetValue(SecurityUtils.Identities, out obj)) 2027SecurityUtils.FixNetworkCredential(ref credential); 2103credential = SecurityUtils.GetNetworkCredentialOrDefault(clientCredentials.Windows.ClientCredential); 2108return SecurityUtils.GetCredentialsHandle("Kerberos", credential, false); 2117if (SecurityUtils.IsOsGreaterThanXP()) 2119return SecurityUtils.GetCredentialsHandle("Negotiate", credential, false, "!NTLM"); 2123return SecurityUtils.GetCredentialsHandle("Kerberos", credential, false); 2129return SecurityUtils.GetCredentialsHandle("Negotiate", credential, false); 2185SecurityUtils.ResetAllCertificates(certs); 2290return new WrappedKeySecurityToken(SecurityUtils.GenerateId(), unwrappedKey, wrappingAlgorithm,
System\ServiceModel\Security\SendSecurityHeader.cs (8)
323this.shouldSignToHeader |= (!this.RequireMessageProtection) && (SecurityUtils.GetSecurityKey<AsymmetricSecurityKey>(token) != null); 337this.shouldSignToHeader |= (!this.RequireMessageProtection) && (SecurityUtils.GetSecurityKey<AsymmetricSecurityKey>(token) != null); 362string id = this.RequireMessageProtection ? SecurityUtils.GenerateId() : GenerateId(); 405if (!SecurityUtils.HasSymmetricSecurityKey(elementContainer.SourceEncryptionToken)) 433string expectedDerivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(this.StandardsManager.MessageSecurityVersion.SecureConversationVersion); 798string expectedDerivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(this.StandardsManager.MessageSecurityVersion.SecureConversationVersion); 931string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(this.StandardsManager.MessageSecurityVersion.SecureConversationVersion); 962string derivationAlgorithm = SecurityUtils.GetKeyDerivationAlgorithm(this.StandardsManager.MessageSecurityVersion.SecureConversationVersion);
System\ServiceModel\Security\ServiceCredentialsSecurityTokenManager.cs (11)
78authenticator.BootstrapSecurityBindingElement = SecurityUtils.GetIssuerSecurityBindingElement(recipientRequirement); 87authenticator.StandardsManager = SecurityUtils.CreateSecurityStandardsManager(recipientRequirement, this); 99authenticator.BootstrapSecurityBindingElement = SecurityUtils.GetIssuerSecurityBindingElement(recipientRequirement); 107authenticator.StandardsManager = SecurityUtils.CreateSecurityStandardsManager(recipientRequirement, this); 151authenticator.StandardsManager = SecurityUtils.CreateSecurityStandardsManager(recipientRequirement, this); 157authenticator.MaxMessageSize = SecurityUtils.GetMaxNegotiationBufferSize(authenticator.IssuerBindingContext); 220authenticator.StandardsManager = SecurityUtils.CreateSecurityStandardsManager(recipientRequirement, this); 232authenticator.MaxMessageSize = SecurityUtils.GetMaxNegotiationBufferSize(authenticator.IssuerBindingContext); 310SecurityUtils.EnsureCertificateCanDoKeyExchange(parent.ServiceCertificate.Certificate); 514return SecurityUtils.CreateWindowsIdentity(); 550this.credentialsHandle = SecurityUtils.GetCredentialsHandle("Kerberos", null, true);
System\ServiceModel\Security\SimpleSecurityTokenProvider.cs (1)
105policies.Add(new UnconditionalPolicy(SecurityUtils.CreateIdentity(endpointIdentity.IdentityClaim.Resource.ToString()),
System\ServiceModel\Security\SpnegoTokenAuthenticator.cs (2)
91this.credentialsHandle = SecurityUtils.GetCredentialsHandle("Negotiate", this.serverCredential, true); 137SecurityUtils.ValidateAnonymityConstraint(windowsIdentity, this.AllowUnauthenticatedCallers);
System\ServiceModel\Security\SpnegoTokenProvider.cs (6)
141bool osIsGreaterThanXP = SecurityUtils.IsOsGreaterThanXP(); 165this.credentialsHandle = SecurityUtils.GetCredentialsHandle(packageName, credential, false, "!NTLM"); 169this.credentialsHandle = SecurityUtils.GetCredentialsHandle(packageName, credential, false); 233spn = SecurityUtils.GetSpnFromIdentity(identity, target); 251if (!this.allowNtlm && !SecurityUtils.IsOsGreaterThanXP()) 278return SecurityUtils.CreatePrincipalNameAuthorizationPolicies(windowsNegotiation.ServicePrincipalName);
System\ServiceModel\Security\SspiNegotiationTokenAuthenticator.cs (6)
58this.defaultServiceBinding = SecurityUtils.GetSpnFromIdentity( 59SecurityUtils.CreateWindowsIdentity(), 79UniqueId contextId = SecurityUtils.GenerateUniqueId(); 80string id = SecurityUtils.GenerateId(); 158return generator.GenerateDerivedKey(SecurityUtils.CombinedHashLabel, negotiationHash, SecurityNegotiationConstants.NegotiationAuthenticatorSize, 0); 256SecurityUtils.GetChannelBindingFromMessage(incomingMessage),
System\ServiceModel\Security\SspiNegotiationTokenProvider.cs (3)
153byte[] clientAuthenticator = generator.GenerateDerivedKey(SecurityUtils.CombinedHashLabel, negotiationHash, SecurityNegotiationConstants.NegotiationAuthenticatorSize, 0); 203if (!SecurityUtils.IsChannelBindingDisabled && (this.securityBindingElement is TransportSecurityBindingElement)) 336SecurityUtils.GetChannelBindingFromMessage(incomingMessage),
System\ServiceModel\Security\SymmetricSecurityProtocol.cs (7)
88SecurityUtils.OpenTokenProviderIfRequired(tokenProvider, timeoutHelper.RemainingTime()); 104SecurityUtils.OpenTokenAuthenticatorIfRequired(this.initiatorTokenAuthenticator, timeoutHelper.RemainingTime()); 115SecurityUtils.AbortTokenProviderIfRequired(provider); 119SecurityUtils.AbortTokenAuthenticatorIfRequired(this.initiatorTokenAuthenticator); 133SecurityUtils.CloseTokenProviderIfRequired(provider, timeoutHelper.RemainingTime()); 137SecurityUtils.CloseTokenAuthenticatorIfRequired(this.initiatorTokenAuthenticator, timeoutHelper.RemainingTime()); 244string tokenId = SecurityUtils.GenerateId();
System\ServiceModel\Security\SymmetricSecurityProtocolFactory.cs (4)
110SecurityUtils.CloseTokenAuthenticatorIfRequired(this.recipientSymmetricTokenAuthenticator, timeoutHelper.RemainingTime()); 114SecurityUtils.CloseTokenProviderIfRequired(this.recipientAsymmetricTokenProvider, timeoutHelper.RemainingTime()); 126SecurityUtils.AbortTokenAuthenticatorIfRequired(this.recipientSymmetricTokenAuthenticator); 130SecurityUtils.AbortTokenProviderIfRequired(this.recipientAsymmetricTokenProvider);
System\ServiceModel\Security\TlsnegoTokenAuthenticator.cs (7)
78SecurityUtils.EnsureCertificateCanDoKeyExchange(result.Certificate); 107SecurityUtils.OpenTokenProviderIfRequired(this.serverTokenProvider, timeoutHelper.RemainingTime()); 110SecurityUtils.OpenTokenAuthenticatorIfRequired(this.clientTokenAuthenticator, timeoutHelper.RemainingTime()); 122SecurityUtils.CloseTokenProviderIfRequired(this.serverTokenProvider, timeoutHelper.RemainingTime()); 127SecurityUtils.CloseTokenAuthenticatorIfRequired(this.clientTokenAuthenticator, timeoutHelper.RemainingTime()); 141SecurityUtils.AbortTokenProviderIfRequired(this.serverTokenProvider); 146SecurityUtils.AbortTokenAuthenticatorIfRequired(this.clientTokenAuthenticator);
System\ServiceModel\Security\TlsnegoTokenProvider.cs (6)
191SecurityUtils.OpenTokenProviderIfRequired(this.ClientTokenProvider, timeoutHelper.RemainingTime()); 195SecurityUtils.OpenTokenAuthenticatorIfRequired(this.ServerTokenAuthenticator, timeoutHelper.RemainingTime()); 205SecurityUtils.CloseTokenProviderIfRequired(this.ClientTokenProvider, timeoutHelper.RemainingTime()); 210SecurityUtils.CloseTokenAuthenticatorIfRequired(this.ServerTokenAuthenticator, timeoutHelper.RemainingTime()); 220SecurityUtils.AbortTokenProviderIfRequired(this.ClientTokenProvider); 225SecurityUtils.AbortTokenAuthenticatorIfRequired(this.ServerTokenAuthenticator);
System\ServiceModel\Security\TlsSspiNegotiation.cs (6)
165return SecurityUtils.MaxUtcDateTime; 328return SecurityUtils.GetCertificateId(cert); 424if (SecurityUtils.ShouldValidateSslCipherStrength()) 431SecurityUtils.ValidateSslCipherStrength(connectionInfo.DataKeySize); 552hasPrivateKey = certificate.HasPrivateKey && SecurityUtils.CanReadPrivateKey(certificate); 688mappedIdentity = new WindowsIdentity(token.DangerousGetHandle(), SecurityUtils.AuthTypeCertMap);
System\ServiceModel\Security\Tokens\DerivedKeySecurityToken.cs (5)
51: this(tokenToDerive, tokenToDeriveIdentifier, length, SecurityUtils.GenerateId()) 158return SecurityUtils.CloneBuffer(this.key); 163return SecurityUtils.CloneBuffer(this.nonce); 212if (!SecurityUtils.IsSupportedAlgorithm(derivationAlgorithm, tokenToDerive)) 260this.key = SecurityUtils.GenerateDerivedKey(this.tokenToDerive, this.keyDerivationAlgorithm,
System\ServiceModel\Security\Tokens\IssuedSecurityTokenParameters.cs (1)
314return CreateRequestParameters(SecurityUtils.CreateSecurityStandardsManager(messageSecurityVersion, securityTokenSerializer).TrustDriver);
System\ServiceModel\Security\Tokens\IssuedSecurityTokenProvider.cs (2)
707this.credentialsHandle = SecurityUtils.GetCredentialsHandle(this.IssuerBinding, this.IssuerChannelBehaviors); 942policies.Add(new UnconditionalPolicy(SecurityUtils.CreateIdentity(identity.IdentityClaim.Resource.ToString()),
System\ServiceModel\Security\Tokens\KerberosRequestorSecurityTokenAuthenticator.cs (2)
33policies.Add(new UnconditionalPolicy(SecurityUtils.CreateIdentity(kerbToken.ServicePrincipalName, SecurityUtils.AuthTypeKerberos), claimSet));
System\ServiceModel\Security\Tokens\SecurityContextCookieSerializer.cs (6)
41DateTime effectiveTime = SecurityUtils.MinUtcDateTime; 42DateTime expiryTime = SecurityUtils.MaxUtcDateTime; 46DateTime keyEffectiveTime = SecurityUtils.MinUtcDateTime; 47DateTime keyExpirationTime = SecurityUtils.MaxUtcDateTime; 290if (!evaluationContext.Properties.TryGetValue(SecurityUtils.Identities, out obj)) 292evaluationContext.Properties.Add(SecurityUtils.Identities, this.identities);
System\ServiceModel\Security\Tokens\SecurityContextSecurityToken.cs (1)
34: this(contextId, SecurityUtils.GenerateId(), key, validFrom, validTo)
System\ServiceModel\Security\Tokens\SecurityTokenProviderContainer.cs (3)
33SecurityUtils.CloseTokenProviderIfRequired(this.tokenProvider, timeout); 39SecurityUtils.OpenTokenProviderIfRequired(this.tokenProvider, timeout); 45SecurityUtils.AbortTokenProviderIfRequired(this.tokenProvider);
System\ServiceModel\Security\Tokens\SspiSecurityToken.cs (2)
30this.networkCredential = SecurityUtils.GetNetworkCredentialsCopy(networkCredential); 37this.networkCredential = SecurityUtils.GetNetworkCredentialsCopy(networkCredential);
System\ServiceModel\Security\TransportSecurityProtocol.cs (1)
262securityHeader.Process(timeoutHelper.RemainingTime(), SecurityUtils.GetChannelBindingFromMessage(message), factory.ExtendedProtectionPolicy);
System\ServiceModel\Security\WindowsClientCredential.cs (1)
27this.windowsCredentials = SecurityUtils.GetNetworkCredentialsCopy(other.windowsCredentials);
System\ServiceModel\Security\WindowsSspiNegotiation.cs (2)
94return SecurityUtils.MaxUtcDateTime; 455&& SecurityUtils.IsOSGreaterThanOrEqualToWin7()
System\ServiceModel\Security\WSSecurityJan2004.cs (2)
589byte[] unwrappedKey = SecurityUtils.DecryptKey(unwrappingToken, encryptionMethod, wrappedKey, out unwrappingSecurityKey); 622if (!SecurityUtils.TryCreateX509CertificateFromRawData(rawData, out certificate))
System\ServiceModel\Security\WSSecurityOneDotZeroReceiveSecurityHeader.cs (1)
51SymmetricSecurityKey symmetricSecurityKey = SecurityUtils.GetSecurityKey<SymmetricSecurityKey>(token);
System\ServiceModel\Security\WSSecurityOneDotZeroSendSecurityHeader.cs (1)
635this.encryptingSymmetricAlgorithm = SecurityUtils.GetSymmetricAlgorithm(this.EncryptionAlgorithm, token);
System\ServiceModel\Security\WSTrust.cs (3)
345DateTime expires = SecurityUtils.MaxUtcDateTime; 1184DateTime effectiveTime = SecurityUtils.MinUtcDateTime; 1185DateTime expirationTime = SecurityUtils.MaxUtcDateTime;
System\ServiceModel\Security\WSUtilitySpecificationVersion.cs (1)
113expiryTimeUtc = SecurityUtils.MaxUtcDateTime;
System\ServiceModel\Security\X509CertificateInitiatorClientCredential.cs (1)
59this.certificate = SecurityUtils.GetCertificateFromStore(storeName, storeLocation, findType, findValue, null);
System\ServiceModel\Security\X509CertificateInitiatorServiceCredential.cs (1)
69this.certificate = SecurityUtils.GetCertificateFromStore(storeName, storeLocation, findType, findValue, null);
System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (2)
107this.defaultCertificate = SecurityUtils.GetCertificateFromStore(storeName, storeLocation, findType, findValue, null); 130X509Certificate2 certificate = SecurityUtils.GetCertificateFromStore(storeName, storeLocation, findType, findValue, null);
System\ServiceModel\Security\X509CertificateRecipientServiceCredential.cs (1)
62this.certificate = SecurityUtils.GetCertificateFromStore(storeName, storeLocation, findType, findValue, null);
System\ServiceModel\Security\X509ClientCertificateAuthentication.cs (2)
260SecurityUtils.GetCertificateId(certificate), GetChainStatusInformation(chain.ChainStatus))); 274SecurityUtils.GetCertificateId(certificate), GetChainStatusInformation(chain.ChainStatus)));
System\ServiceModel\ServiceSecurityContext.cs (3)
107this.identityClaim = SecurityUtils.GetPrimaryIdentityClaim(this.AuthorizationContext); 127this.primaryIdentity = primaryIdentity ?? SecurityUtils.AnonymousIdentity; 193if (authContext != null && authContext.Properties.TryGetValue(SecurityUtils.Identities, out identities))
System\ServiceModel\SpnEndpointIdentity.cs (1)
154DirectoryEntry tmp = new DirectoryEntry(@"LDAP://" + SecurityUtils.GetPrimaryDomain());