Example #1
0
		public TlsConfiguration (TlsProtocols protocols, TlsSettings settings, string targetHost)
		{
			supportedProtocols = protocols;
			requestedProtocol = CheckProtocol (ref supportedProtocols, false);
			TlsSettings = settings ?? new TlsSettings ();
			TargetHost = targetHost;

			RenegotiationFlags = DefaultRenegotiationFlags;
		}
Example #2
0
        public TlsConfiguration(TlsProtocols protocols, TlsSettings settings, string targetHost)
        {
            supportedProtocols = protocols;
            requestedProtocol  = CheckProtocol(ref supportedProtocols, false);
            UserSettings       = settings ?? new TlsSettings();
            TargetHost         = targetHost;

            RenegotiationFlags = DefaultRenegotiationFlags;
        }
Example #3
0
		public TlsConfiguration (TlsProtocols protocols, TlsSettings settings, MX.X509Certificate certificate, AsymmetricAlgorithm privateKey)
		{
			supportedProtocols = protocols;
			requestedProtocol = CheckProtocol (ref supportedProtocols, true);
			TlsSettings = settings ?? new TlsSettings ();
			Certificate = certificate;
			PrivateKey = privateKey;

			RenegotiationFlags = DefaultRenegotiationFlags;
		}
Example #4
0
        public TlsConfiguration(TlsProtocols protocols, TlsSettings settings, MX.X509Certificate certificate, AsymmetricAlgorithm privateKey)
        {
            supportedProtocols = protocols;
            requestedProtocol  = CheckProtocol(ref supportedProtocols, true);
            UserSettings       = settings ?? new TlsSettings();
            Certificate        = certificate;
            PrivateKey         = privateKey;

            RenegotiationFlags = DefaultRenegotiationFlags;
        }
Example #5
0
		protected override TlsSettings GetSettings (UserSettings userSettings)
		{
			var settings = new TlsSettings (userSettings);
			if ((Parameters.Flags & ServerFlags.RequireClientCertificate) != 0)
				settings.UserSettings.RequireClientCertificate = settings.UserSettings.AskForClientCertificate = true;
			else if ((Parameters.Flags & ServerFlags.AskForClientCertificate) != 0)
				settings.UserSettings.AskForClientCertificate = true;

			if (MonoParameters != null)
				settings.UserSettings.RequestedCiphers = MonoParameters.ServerCiphers;

			return settings;
		}
Example #6
0
		internal MonoNewTlsStream (Stream innerStream, bool leaveOpen, TlsSettings settings)
			: this (innerStream, leaveOpen, null, settings)
		{
		}
Example #7
0
		internal MonoNewTlsStream (Stream innerStream, TlsSettings settings)
			: this (innerStream, false, null, settings)
		{
		}