You've already forked linux-packaging-mono
Imported Upstream version 4.4.2.4
Former-commit-id: 92904c9c5915c37244316e42ba99e7b934ed7ee2
This commit is contained in:
parent
589d484eee
commit
0b4a830db1
@ -25,22 +25,29 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Selectors;
|
||||
using System.IdentityModel.Tokens;
|
||||
#endif
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Security;
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using ReqType = System.ServiceModel.Security.Tokens.ServiceModelSecurityTokenRequirement;
|
||||
#endif
|
||||
|
||||
namespace System.ServiceModel.Security.Tokens
|
||||
{
|
||||
public class SecureConversationSecurityTokenParameters : SecurityTokenParameters
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
static readonly ChannelProtectionRequirements default_channel_protection_requirements;
|
||||
#endif
|
||||
static readonly BindingContext dummy_context;
|
||||
|
||||
static SecureConversationSecurityTokenParameters ()
|
||||
{
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
ChannelProtectionRequirements r =
|
||||
new ChannelProtectionRequirements ();
|
||||
r.IncomingSignatureParts.ChannelParts.IsBodyIncluded = true;
|
||||
@ -49,6 +56,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
r.OutgoingEncryptionParts.ChannelParts.IsBodyIncluded = true;
|
||||
r.MakeReadOnly ();
|
||||
default_channel_protection_requirements = r;
|
||||
#endif
|
||||
|
||||
dummy_context = new BindingContext (
|
||||
new CustomBinding (),
|
||||
@ -56,7 +64,9 @@ namespace System.ServiceModel.Security.Tokens
|
||||
}
|
||||
|
||||
SecurityBindingElement element;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
ChannelProtectionRequirements requirements;
|
||||
#endif
|
||||
bool cancellable;
|
||||
|
||||
public SecureConversationSecurityTokenParameters ()
|
||||
@ -77,6 +87,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
{
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public SecureConversationSecurityTokenParameters (
|
||||
SecurityBindingElement element,
|
||||
bool requireCancellation,
|
||||
@ -89,13 +100,25 @@ namespace System.ServiceModel.Security.Tokens
|
||||
else
|
||||
this.requirements = new ChannelProtectionRequirements (requirements);
|
||||
}
|
||||
#else
|
||||
internal SecureConversationSecurityTokenParameters (
|
||||
SecurityBindingElement element,
|
||||
bool requireCancellation,
|
||||
object dummy)
|
||||
{
|
||||
this.element = element;
|
||||
this.cancellable = requireCancellation;
|
||||
}
|
||||
#endif
|
||||
|
||||
protected SecureConversationSecurityTokenParameters (SecureConversationSecurityTokenParameters source)
|
||||
: base (source)
|
||||
{
|
||||
this.element = (SecurityBindingElement) source.element.Clone ();
|
||||
this.cancellable = source.cancellable;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
|
||||
#endif
|
||||
}
|
||||
|
||||
public bool RequireCancellation {
|
||||
@ -108,9 +131,11 @@ namespace System.ServiceModel.Security.Tokens
|
||||
set { element = value; }
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public ChannelProtectionRequirements BootstrapProtectionRequirements {
|
||||
get { return requirements; }
|
||||
}
|
||||
#endif
|
||||
|
||||
// SecurityTokenParameters
|
||||
|
||||
@ -135,13 +160,13 @@ namespace System.ServiceModel.Security.Tokens
|
||||
return new SecureConversationSecurityTokenParameters (this);
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[MonoTODO]
|
||||
protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause (
|
||||
SecurityToken token, SecurityTokenReferenceStyle referenceStyle)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected internal override void InitializeSecurityTokenRequirement (SecurityTokenRequirement requirement)
|
||||
{
|
||||
@ -154,6 +179,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
requirement.Properties [ReqType.IssuedSecurityTokenParametersProperty] = this.Clone ();
|
||||
requirement.KeyType = SecurityKeyType.SymmetricKey;
|
||||
}
|
||||
#endif
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
|
@ -25,8 +25,11 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Selectors;
|
||||
using System.IdentityModel.Tokens;
|
||||
#endif
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Security;
|
||||
using System.Text;
|
||||
@ -114,6 +117,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
|
||||
protected abstract SecurityTokenParameters CloneCore ();
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
protected abstract SecurityKeyIdentifierClause CreateKeyIdentifierClause (
|
||||
SecurityToken token, SecurityTokenReferenceStyle referenceStyle);
|
||||
|
||||
@ -125,11 +129,13 @@ namespace System.ServiceModel.Security.Tokens
|
||||
}
|
||||
|
||||
protected internal abstract void InitializeSecurityTokenRequirement (SecurityTokenRequirement requirement);
|
||||
#endif
|
||||
|
||||
internal BindingContext IssuerBindingContext {
|
||||
set { issuer_binding_context = value; }
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
internal void CallInitializeSecurityTokenRequirement (SecurityTokenRequirement requirement)
|
||||
{
|
||||
if (issuer_binding_context != null)
|
||||
@ -145,5 +151,6 @@ namespace System.ServiceModel.Security.Tokens
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +25,10 @@
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.IdentityModel.Selectors;
|
||||
using System.IdentityModel.Tokens;
|
||||
#endif
|
||||
using System.ServiceModel.Security;
|
||||
|
||||
namespace System.ServiceModel.Security.Tokens
|
||||
@ -64,6 +66,7 @@ namespace System.ServiceModel.Security.Tokens
|
||||
return new UserNameSecurityTokenParameters (this);
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause (
|
||||
SecurityToken token, SecurityTokenReferenceStyle referenceStyle)
|
||||
{
|
||||
@ -81,5 +84,6 @@ namespace System.ServiceModel.Security.Tokens
|
||||
requirement.TokenType = SecurityTokenTypes.UserName;
|
||||
requirement.RequireCryptographicToken = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user