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 AppleTlsContext( MobileAuthenticatedStream parent, bool serverMode, string targetHost, SSA.SslProtocols enabledProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, bool askForClientCert) : base(parent, serverMode, targetHost, enabledProtocols, serverCertificate, clientCertificates, askForClientCert) { handle = GCHandle.Alloc(this); connectionId = GCHandle.ToIntPtr(handle); readFunc = NativeReadCallback; writeFunc = NativeWriteCallback; if (IsServer) { if (serverCertificate == null) { throw new ArgumentNullException("serverCertificate"); } } }
public AsyncProtocolRequest(MobileAuthenticatedStream parent, LazyAsyncResult lazyResult, BufferOffsetSize userBuffer = null) { Parent = parent; UserAsyncResult = lazyResult; UserBuffer = userBuffer; }
internal static MobileTlsStream CreateTlsStream(MobileAuthenticatedStream parent, MonoTlsSettings settings, MobileTlsProvider provider, bool serverMode, string targetHost, SslProtocols enabledProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, bool clientCertRequired) { return(new AppleTlsContext(parent, settings, provider, serverMode, targetHost, enabledProtocols, serverCertificate, clientCertificates, clientCertRequired)); }
internal static MobileTlsStream CreateTlsStream(MobileAuthenticatedStream parent, MonoTlsSettings settings, MobileTlsProvider provider, bool serverMode, string targetHost, SslProtocols enabledProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, bool clientCertRequired) { return new AppleTlsContext (parent, settings, provider, serverMode, targetHost, enabledProtocols, serverCertificate, clientCertificates, clientCertRequired); }