コード例 #1
0
        // Token: 0x060008B5 RID: 2229 RVA: 0x0001DA6C File Offset: 0x0001BC6C
        protected override void StartAuthenticatedStream(Socket client)
        {
            SecurityOption security = base.Security;

            if (security == null)
            {
                throw new Exception("securityOption was not configured");
            }
            SslStream sslStream = new SslStream(new NetworkStream(client), false, new RemoteCertificateValidationCallback(this.ValidateRemoteCertificate));

            sslStream.BeginAuthenticateAsClient(base.HostName, security.Certificates, security.EnabledSslProtocols, false, new AsyncCallback(this.OnAuthenticated), sslStream);
        }
コード例 #2
0
        protected override void StartAuthenticatedStream(Socket client)
        {
            SecurityOption security = base.Security;

            if (security == null)
            {
                throw new Exception("securityOption was not configured");
            }
            SslStream sslStream = new SslStream(new NetworkStream(client), leaveInnerStreamOpen: false, ValidateRemoteCertificate);

            sslStream.BeginAuthenticateAsClient(base.HostName, security.Certificates, security.EnabledSslProtocols, checkCertificateRevocation: false, OnAuthenticated, sslStream);
        }
コード例 #3
0
        // Token: 0x060008F0 RID: 2288 RVA: 0x0001E2F4 File Offset: 0x0001C4F4
        private TcpClientSession GetUnderlyingSession()
        {
            SecurityOption security = this.Security;

            if (security == null || security.EnabledSslProtocols == SslProtocols.None)
            {
                return(new AsyncTcpSession());
            }
            return(new SslStreamTcpSession
            {
                Security = security
            });
        }
コード例 #4
0
 // Token: 0x060008AF RID: 2223 RVA: 0x00006D82 File Offset: 0x00004F82
 public SecurityOption() : this(SecurityOption.GetDefaultProtocol(), new X509CertificateCollection())
 {
 }