コード例 #1
0
ファイル: FtpSession.cs プロジェクト: jenistonj/FTP
        /// <summary>
        /// Checks the certificate.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="certificate">The certificate.</param>
        /// <param name="chain">The chain.</param>
        /// <param name="sslpolicyerrors">The sslpolicyerrors.</param>
        /// <returns></returns>
        private bool CheckCertificateHandler(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslpolicyerrors)
        {
            var e = new CheckCertificateEventArgs(certificate, chain, sslpolicyerrors);

            Connection.Client.OnCheckCertificate(e);
            return(e.IsValid);
        }
コード例 #2
0
ファイル: FtpClient.cs プロジェクト: kin988g/FTP
        /// <summary>
        /// Raises the <see cref="CheckCertificate"/> event.
        /// </summary>
        /// <param name="eventArgs">The <see cref="ArxOne.Ftp.CheckCertificateEventArgs"/> instance containing the event data.</param>
        public void OnCheckCertificate(CheckCertificateEventArgs eventArgs)
        {
            var checkCertificate = CheckCertificate;

            if (checkCertificate != null)
            {
                checkCertificate(this, eventArgs);
            }
        }