次のコードを使用することで、クライアント アプリケーションはセキュア FTP サーバーに接続し、そこにファイルを正常にプッシュします。次のアプローチは、すべての証明書を受け入れることにより、セキュリティ ホールを残していると思いますか。もしそうなら、私がFTPサーバーに持っているクライアントから特定の証明書を渡すのを手伝ってくれる人はいますか?
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications);
// Where AcceptAllCertifications is defined as...
public bool AcceptAllCertifications(object sender,
System.Security.Cryptography.X509Certificates.X509Certificate certification,
System.Security.Cryptography.X509Certificates.X509Chain chain,
System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
}