Esempio n. 1
0
 private SslStreamSecurityUpgradeProvider(IDefaultCommunicationTimeouts timeouts, SecurityTokenManager clientSecurityTokenManager, bool requireClientCertificate, string scheme, System.ServiceModel.Security.IdentityVerifier identityVerifier) : base(timeouts)
 {
     this.identityVerifier           = identityVerifier;
     this.scheme                     = scheme;
     this.clientSecurityTokenManager = clientSecurityTokenManager;
     this.requireClientCertificate   = requireClientCertificate;
 }
 protected override void OnOpened()
 {
     base.OnOpened();
     if (this.identityVerifier == null)
     {
         this.identityVerifier = System.ServiceModel.Security.IdentityVerifier.CreateDefault();
     }
     if (this.serverCredential == null)
     {
         this.serverCredential = CredentialCache.DefaultNetworkCredentials;
     }
 }
 private LocalClientSecuritySettings(LocalClientSecuritySettings other)
 {
     this.detectReplays                    = other.detectReplays;
     this.replayCacheSize                  = other.replayCacheSize;
     this.replayWindow                     = other.replayWindow;
     this.maxClockSkew                     = other.maxClockSkew;
     this.cacheCookies                     = other.cacheCookies;
     this.maxCookieCachingTime             = other.maxCookieCachingTime;
     this.sessionKeyRenewalInterval        = other.sessionKeyRenewalInterval;
     this.sessionKeyRolloverInterval       = other.sessionKeyRolloverInterval;
     this.reconnectTransportOnFailure      = other.reconnectTransportOnFailure;
     this.timestampValidityDuration        = other.timestampValidityDuration;
     this.identityVerifier                 = other.identityVerifier;
     this.cookieRenewalThresholdPercentage = other.cookieRenewalThresholdPercentage;
 }
        internal MessageSecurityProtocolFactory(MessageSecurityProtocolFactory factory)
            : base(factory)
        {
            if (factory == null)
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("factory");

            this.applyIntegrity = factory.applyIntegrity;
            this.applyConfidentiality = factory.applyConfidentiality;
            this.identityVerifier = factory.identityVerifier;
            this.protectionRequirements = new ChannelProtectionRequirements(factory.protectionRequirements);
            this.messageProtectionOrder = factory.messageProtectionOrder;
            this.requireIntegrity = factory.requireIntegrity;
            this.requireConfidentiality = factory.requireConfidentiality;
            this.doRequestSignatureConfirmation = factory.doRequestSignatureConfirmation;
        }
 LocalClientSecuritySettings(LocalClientSecuritySettings other)
 {
     this.detectReplays = other.detectReplays;
     this.replayCacheSize = other.replayCacheSize;
     this.replayWindow = other.replayWindow;
     this.maxClockSkew = other.maxClockSkew;
     this.cacheCookies = other.cacheCookies;
     this.maxCookieCachingTime = other.maxCookieCachingTime;
     this.sessionKeyRenewalInterval = other.sessionKeyRenewalInterval;
     this.sessionKeyRolloverInterval = other.sessionKeyRolloverInterval;
     this.reconnectTransportOnFailure = other.reconnectTransportOnFailure;
     this.timestampValidityDuration = other.timestampValidityDuration;
     this.identityVerifier = other.identityVerifier;
     this.cookieRenewalThresholdPercentage = other.cookieRenewalThresholdPercentage;
     this.nonceCache = other.nonceCache;
 }
 private LocalClientSecuritySettings(LocalClientSecuritySettings other)
 {
     _detectReplays = other._detectReplays;
     _replayCacheSize = other._replayCacheSize;
     _replayWindow = other._replayWindow;
     _maxClockSkew = other._maxClockSkew;
     _cacheCookies = other._cacheCookies;
     _maxCookieCachingTime = other._maxCookieCachingTime;
     _sessionKeyRenewalInterval = other._sessionKeyRenewalInterval;
     _sessionKeyRolloverInterval = other._sessionKeyRolloverInterval;
     _reconnectTransportOnFailure = other._reconnectTransportOnFailure;
     _timestampValidityDuration = other._timestampValidityDuration;
     _identityVerifier = other._identityVerifier;
     _cookieRenewalThresholdPercentage = other._cookieRenewalThresholdPercentage;
     _nonceCache = other._nonceCache;
 }
 internal MessageSecurityProtocolFactory(MessageSecurityProtocolFactory factory)
     : base((SecurityProtocolFactory)factory)
 {
     if (factory == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("factory");
     }
     this.applyIntegrity                 = factory.applyIntegrity;
     this.applyConfidentiality           = factory.applyConfidentiality;
     this.identityVerifier               = factory.identityVerifier;
     this.protectionRequirements         = new ChannelProtectionRequirements(factory.protectionRequirements);
     this.messageProtectionOrder         = factory.messageProtectionOrder;
     this.requireIntegrity               = factory.requireIntegrity;
     this.requireConfidentiality         = factory.requireConfidentiality;
     this.doRequestSignatureConfirmation = factory.doRequestSignatureConfirmation;
 }
 public LocalClientSecuritySettings()
 {
     this.DetectReplays = SecurityProtocolFactory.defaultDetectReplays;
     this.ReplayCacheSize = SecurityProtocolFactory.defaultMaxCachedNonces;
     this.ReplayWindow = SecurityProtocolFactory.defaultReplayWindow;
     this.MaxClockSkew = SecurityProtocolFactory.defaultMaxClockSkew;
     this.TimestampValidityDuration = SecurityProtocolFactory.defaultTimestampValidityDuration;
     this.CacheCookies = IssuanceTokenProviderBase<IssuanceTokenProviderState>.defaultClientCacheTokens;
     this.MaxCookieCachingTime = IssuanceTokenProviderBase<IssuanceTokenProviderState>.DefaultClientMaxTokenCachingTime;
     this.SessionKeyRenewalInterval = SecuritySessionClientSettings.defaultKeyRenewalInterval;
     this.SessionKeyRolloverInterval = SecuritySessionClientSettings.defaultKeyRolloverInterval;
     this.ReconnectTransportOnFailure = SecuritySessionClientSettings.defaultTolerateTransportFailures;
     this.CookieRenewalThresholdPercentage = SpnegoTokenProvider.defaultServiceTokenValidityThresholdPercentage;
     this.IdentityVerifier = IdentityVerifier.CreateDefault();
     this.nonceCache = null;
 }
Esempio n. 9
0
 protected SslStreamSecurityBindingElement(SslStreamSecurityBindingElement elementToBeCloned) : base(elementToBeCloned)
 {
     this.identityVerifier         = elementToBeCloned.identityVerifier;
     this.requireClientCertificate = elementToBeCloned.requireClientCertificate;
 }
        protected override void OnOpened()
        {
            base.OnOpened();

            if (_identityVerifier == null)
            {
                _identityVerifier = IdentityVerifier.CreateDefault();
            }

            if (_serverCredential == null)
            {
                _serverCredential = CredentialCache.DefaultNetworkCredentials;
            }
        }
 protected override void OnOpened()
 {
     base.OnOpened();
     if (this.identityVerifier == null)
     {
         this.identityVerifier = System.ServiceModel.Security.IdentityVerifier.CreateDefault();
     }
     if (this.serverCredential == null)
     {
         this.serverCredential = CredentialCache.DefaultNetworkCredentials;
     }
 }