Пример #1
0
        public override void Close()
        {
            Debug("Close!");

            if (ssl != null)
            {
                ssl.Dispose();
                ssl = null;
            }
            if (ctx != null)
            {
                ctx.Dispose();
                ctx = null;
            }
            if (bio != null)
            {
                bio.Dispose();
                bio = null;
            }
            if (errbio != null)
            {
                errbio.Dispose();
                errbio = null;
            }
        }
Пример #2
0
        public override void StartHandshake()
        {
            InitializeConnection();

            ssl = new MonoBtlsSsl(ctx);

            bio = new MonoBtlsBioMono(this);
            ssl.SetBio(bio);

            if (IsServer)
            {
                if (nativeServerCertificate != null)
                {
                    SetPrivateCertificate(nativeServerCertificate);
                }
            }
            else
            {
                ssl.SetServerName(ServerName);
            }

            if (Options.AllowRenegotiation)
            {
                ssl.SetRenegotiateMode(MonoBtlsSslRenegotiateMode.FREELY);
            }
        }
Пример #3
0
        public override void StartHandshake()
        {
            InitializeConnection();

            ssl = new MonoBtlsSsl(ctx);

            bio = new MonoBtlsBioMono(this);
            ssl.SetBio(bio);

            if (IsServer)
            {
                SetPrivateCertificate(nativeServerCertificate);
            }
            else
            {
                ssl.SetServerName(ServerName);
            }
        }