public AppleTlsContext( MobileAuthenticatedStream parent, MonoTlsSettings settings, AppleTlsProvider provider, bool serverMode, string targetHost, SSA.SslProtocols enabledProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, bool askForClientCert) { this.parent = parent; this.settings = settings; this.provider = provider; this.serverMode = serverMode; this.targetHost = targetHost; this.enabledProtocols = enabledProtocols; this.serverCertificate = serverCertificate; this.clientCertificates = clientCertificates; this.askForClientCert = askForClientCert; handle = GCHandle.Alloc(this); connectionId = GCHandle.ToIntPtr(handle); readFunc = NativeReadCallback; writeFunc = NativeWriteCallback; certificateValidator = CertificateValidationHelper.GetDefaultValidator(settings, provider); if (IsServer) { if (serverCertificate == null) { throw new ArgumentNullException("serverCertificate"); } } }
public AppleTlsContext( MobileAuthenticatedStream parent, MonoTlsSettings settings, AppleTlsProvider provider, bool serverMode, string targetHost, SSA.SslProtocols enabledProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, bool askForClientCert) { this.parent = parent; this.settings = settings; this.provider = provider; this.serverMode = serverMode; this.targetHost = targetHost; this.enabledProtocols = enabledProtocols; this.serverCertificate = serverCertificate; this.clientCertificates = clientCertificates; this.askForClientCert = askForClientCert; handle = GCHandle.Alloc (this); connectionId = GCHandle.ToIntPtr (handle); readFunc = NativeReadCallback; writeFunc = NativeWriteCallback; // a bit higher than the default maximum fragment size readBuffer = new byte [16384]; writeBuffer = new byte [16384]; certificateValidator = CertificateValidationHelper.GetDefaultValidator (settings, provider); if (IsServer) { if (serverCertificate == null) throw new ArgumentNullException ("serverCertificate"); } }
public MobileAuthenticatedStream(Stream innerStream, bool leaveInnerStreamOpen, MonoTlsSettings settings, AppleTlsProvider provider) : base(innerStream, leaveInnerStreamOpen) { Settings = settings; Provider = provider; readBuffer = new BufferOffsetSize2(16834); writeBuffer = new BufferOffsetSize2(16384); }
public MobileAuthenticatedStream(Stream innerStream, bool leaveInnerStreamOpen, MonoTlsSettings settings, AppleTlsProvider provider) : base(innerStream, leaveInnerStreamOpen) { Settings = settings; Provider = provider; readBuffer = new BufferOffsetSize (new byte [16384], 0, 0); writeBuffer = new BufferOffsetSize (new byte [16384], 0, 0); }