void SetUpDelayedSecurityExecution(ref Message message, SecurityToken prerequisiteToken, SecurityToken primaryToken, SecurityTokenParameters primaryTokenParameters, IList <SupportingTokenSpecification> supportingTokens, SecurityProtocolCorrelationState correlationState ) { string actor = string.Empty; SendSecurityHeader securityHeader = ConfigureSendSecurityHeader(message, actor, supportingTokens, correlationState); if (prerequisiteToken != null) { securityHeader.AddPrerequisiteToken(prerequisiteToken); } if (this.Factory.ApplyIntegrity || securityHeader.HasSignedTokens) { if (!this.Factory.ApplyIntegrity) { securityHeader.SignatureParts = MessagePartSpecification.NoParts; } securityHeader.SetSigningToken(primaryToken, primaryTokenParameters); } if (Factory.ApplyConfidentiality || securityHeader.HasEncryptedTokens) { if (!this.Factory.ApplyConfidentiality) { securityHeader.EncryptionParts = MessagePartSpecification.NoParts; } securityHeader.SetEncryptionToken(primaryToken, primaryTokenParameters); } message = securityHeader.SetupExecution(); }
void SetUpDelayedSecurityExecution(ref Message message, SecurityToken encryptingToken, SecurityToken signingToken, IList <SupportingTokenSpecification> supportingTokens, SecurityProtocolCorrelationState correlationState) { AsymmetricSecurityProtocolFactory factory = this.Factory; string actor = string.Empty; SendSecurityHeader securityHeader = ConfigureSendSecurityHeader(message, actor, supportingTokens, correlationState); SecurityTokenParameters signingTokenParameters = (this.Factory.ActAsInitiator) ? this.Factory.CryptoTokenParameters : this.Factory.AsymmetricTokenParameters; SecurityTokenParameters encryptionTokenParameters = (this.Factory.ActAsInitiator) ? this.Factory.AsymmetricTokenParameters : this.Factory.CryptoTokenParameters; if (this.Factory.ApplyIntegrity || securityHeader.HasSignedTokens) { if (!this.Factory.ApplyIntegrity) { securityHeader.SignatureParts = MessagePartSpecification.NoParts; } securityHeader.SetSigningToken(signingToken, signingTokenParameters); } if (Factory.ApplyConfidentiality || securityHeader.HasEncryptedTokens) { if (!this.Factory.ApplyConfidentiality) { securityHeader.EncryptionParts = MessagePartSpecification.NoParts; } securityHeader.SetEncryptionToken(encryptingToken, encryptionTokenParameters); } message = securityHeader.SetupExecution(); }
internal void SetUpDelayedSecurityExecution(ref Message message, string actor, IList <SupportingTokenSpecification> supportingTokens) { SendSecurityHeader securityHeader = base.CreateSendSecurityHeaderForTransportProtocol(message, actor, base.SecurityProtocolFactory); base.AddSupportingTokens(securityHeader, supportingTokens); message = securityHeader.SetupExecution(); }
protected void SecureOutgoingMessageAtResponder(ref Message message, string actor) { if (this.SecurityProtocolFactory.AddTimestamp && !this.SecurityProtocolFactory.SecurityBindingElement.EnableUnsecuredResponse) { SendSecurityHeader securityHeader = CreateSendSecurityHeaderForTransportProtocol(message, actor, this.SecurityProtocolFactory); message = securityHeader.SetupExecution(); } }
internal void SetupDelayedSecurityExecution(string actor, ref Message message, SecurityToken signingToken, SecurityToken sourceToken, SecurityTokenParameters tokenParameters, IList <SupportingTokenSpecification> supportingTokens) { SendSecurityHeader securityHeader = base.CreateSendSecurityHeaderForTransportProtocol(message, actor, this.Factory); securityHeader.RequireMessageProtection = false; if (sourceToken != null) { securityHeader.AddPrerequisiteToken(sourceToken); } base.AddSupportingTokens(securityHeader, supportingTokens); securityHeader.AddEndorsingSupportingToken(signingToken, tokenParameters); message = securityHeader.SetupExecution(); }
private void SetUpDelayedSecurityExecution(ref Message message, SecurityToken signingToken, SecurityToken encryptionToken, SecurityTokenParameters tokenParameters, SecurityProtocolCorrelationState correlationState) { string actor = string.Empty; SendSecurityHeader header = base.ConfigureSendSecurityHeader(message, actor, null, correlationState); if (this.Factory.ApplyIntegrity) { header.SetSigningToken(signingToken, tokenParameters); } if (this.Factory.ApplyConfidentiality) { header.SetEncryptionToken(encryptionToken, tokenParameters); } message = header.SetupExecution(); }
internal void SetUpDelayedSecurityExecution(ref Message message, SecurityToken signingToken, SecurityToken encryptionToken, SecurityToken sourceToken, SecurityTokenParameters tokenParameters, IList <SupportingTokenSpecification> supportingTokens, SecurityProtocolCorrelationState correlationState) { SessionSymmetricMessageSecurityProtocolFactory factory = this.Factory; string actor = string.Empty; SendSecurityHeader header = base.ConfigureSendSecurityHeader(message, actor, supportingTokens, correlationState); if (sourceToken != null) { header.AddPrerequisiteToken(sourceToken); } if (this.Factory.ApplyIntegrity) { header.SetSigningToken(signingToken, tokenParameters); } if (this.Factory.ApplyConfidentiality) { header.SetEncryptionToken(encryptionToken, tokenParameters); } message = header.SetupExecution(); }