FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AsymmetricSecurityBindingElement.cs (17)
128private void ValidateExistingOrSetNewProtectionLevel(MessagePartDescription part, MessageDescription message, OperationDescription operation, ContractDescription contract, ProtectionLevel newProtectionLevel)
130ProtectionLevel existingProtectionLevel;
201private ProtectionLevel _uniformProtectionLevel;
203public ContractProtectionLevel(bool hasProtectionRequirements, bool hasUniformProtectionLevel, ProtectionLevel uniformProtectionLevel)
212public ProtectionLevel UniformProtectionLevel { get { return _uniformProtectionLevel; } }
223ProtectionLevel contractProtectionLevel = ProtectionLevel.None;
263ProtectionLevel protectionLevel = ProtectionLevel.None;
274ProtectionLevel newProtectionLevel = GetProtectionLevel(messageSignedParts.IsBodyIncluded, messageEncryptedParts.IsBodyIncluded, message.Action);
368ProtectionLevel newProtectionLevel = GetProtectionLevel(messageSignedParts.IsBodyIncluded, messageEncryptedParts.IsBodyIncluded, fault.Action);
406if (hasContractProtectionLevel && isContractProtectionLevelUniform && contractProtectionLevel == ProtectionLevel.EncryptAndSign)
444private static ProtectionLevel GetProtectionLevel(bool signed, bool encrypted, string action)
446ProtectionLevel result;
452result = ProtectionLevel.EncryptAndSign;
461result = ProtectionLevel.Sign;
465result = ProtectionLevel.None;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ChannelProtectionRequirements.cs (26)
48internal ChannelProtectionRequirements(ChannelProtectionRequirements other, ProtectionLevel newBodyProtectionLevel)
53_incomingSignatureParts = new ScopedMessagePartSpecification(other._incomingSignatureParts, newBodyProtectionLevel != ProtectionLevel.None);
54_incomingEncryptionParts = new ScopedMessagePartSpecification(other._incomingEncryptionParts, newBodyProtectionLevel == ProtectionLevel.EncryptAndSign);
55_outgoingSignatureParts = new ScopedMessagePartSpecification(other._outgoingSignatureParts, newBodyProtectionLevel != ProtectionLevel.None);
56_outgoingEncryptionParts = new ScopedMessagePartSpecification(other._outgoingEncryptionParts, newBodyProtectionLevel == ProtectionLevel.EncryptAndSign);
206internal static ChannelProtectionRequirements CreateFromContract(ContractDescription contract, ProtectionLevel defaultRequestProtectionLevel, ProtectionLevel defaultResponseProtectionLevel, bool isForClient)
213ProtectionLevel contractScopeDefaultRequestProtectionLevel;
214ProtectionLevel contractScopeDefaultResponseProtectionLevel;
228ProtectionLevel operationScopeDefaultRequestProtectionLevel;
229ProtectionLevel operationScopeDefaultResponseProtectionLevel;
236ProtectionLevel messageScopeDefaultProtectionLevel;
260ProtectionLevel bodyProtectionLevel;
265bodyProtectionLevel = ProtectionLevel.None;
287ProtectionLevel partProtectionLevel = body.HasProtectionLevel ? body.ProtectionLevel : messageScopeDefaultProtectionLevel;
289if (bodyProtectionLevel == ProtectionLevel.EncryptAndSign)
293if (bodyProtectionLevel != ProtectionLevel.None)
296if (bodyProtectionLevel == ProtectionLevel.EncryptAndSign)
329MessagePartSpecification encryptedParts, ProtectionLevel defaultProtectionLevel)
331ProtectionLevel p = header.HasProtectionLevel ? header.ProtectionLevel : defaultProtectionLevel;
332if (p != ProtectionLevel.None)
336if (p == ProtectionLevel.EncryptAndSign)
341private static void AddFaultProtectionRequirements(FaultDescriptionCollection faults, ChannelProtectionRequirements requirements, ProtectionLevel defaultProtectionLevel, bool addToIncoming)
352ProtectionLevel p = fault.HasProtectionLevel ? fault.ProtectionLevel : defaultProtectionLevel;
353if (p != ProtectionLevel.None)
356if (p == ProtectionLevel.EncryptAndSign)