From 7c25853cc1b87e0e1fa5758c0fad09726c7482ab Mon Sep 17 00:00:00 2001 From: Erdogan KURTUR | SmartPulse Date: Thu, 13 Jan 2022 00:21:32 +0300 Subject: [PATCH 1/3] Fixes FubarDevelopment/FtpServer/#97 --- samples/TestFtpServer/FtpOptionsExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/TestFtpServer/FtpOptionsExtensions.cs b/samples/TestFtpServer/FtpOptionsExtensions.cs index 9ed92717..e9b0f405 100644 --- a/samples/TestFtpServer/FtpOptionsExtensions.cs +++ b/samples/TestFtpServer/FtpOptionsExtensions.cs @@ -95,7 +95,7 @@ public static (int from, int to)? GetPasvPortRange(this FtpOptions options) return null; } - var cert = new X509Certificate2(options.Ftps.Certificate); + var cert = new X509Certificate2(options.Ftps.Certificate, options.Ftps.Password); if (cert.HasPrivateKey) { return cert; From 44f10c763f1fe13fc8f1b0e24bdab3d10ce521ae Mon Sep 17 00:00:00 2001 From: Erdogan KURTUR | SmartPulse Date: Thu, 13 Jan 2022 00:24:18 +0300 Subject: [PATCH 2/3] Fixes FubarDevelopment/FtpServer/#122 --- samples/TestFtpServer/OptionsConfigSource.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/TestFtpServer/OptionsConfigSource.cs b/samples/TestFtpServer/OptionsConfigSource.cs index 3a4cd792..1a17cdb2 100644 --- a/samples/TestFtpServer/OptionsConfigSource.cs +++ b/samples/TestFtpServer/OptionsConfigSource.cs @@ -81,7 +81,7 @@ public IConfigurationProvider Build(IConfigurationBuilder builder) { "c|certificate=", "Set the SSL certificate", v => values["ftps:certificate"] = v }, { "k|private-key=", "Set the private key file for the SSL certificate", v => values["ftps:privateKey"] = v }, { "P|password=", "Password for the SSL certificate", v => values["ftps:password"] = v }, - { "i|implicit", "Use implicit FTPS", v => values["ftps:implicit"] = XmlConvert.ToBoolean(v.ToLowerInvariant()) ? "true" : "false" }, + { "i|implicit", "Use implicit FTPS", v => values["ftps:implicit"] = "true" }, "Backends", new Command("system-io", "Use the System.IO file system access") { From 62722e4edefe80e95a9c728f575337c623286a21 Mon Sep 17 00:00:00 2001 From: Erdogan KURTUR | SmartPulse Date: Thu, 13 Jan 2022 00:27:54 +0300 Subject: [PATCH 3/3] Fixes FubarDevelopment/FtpServer/#123 --- src/FubarDev.FtpServer/FtpConnection.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/FubarDev.FtpServer/FtpConnection.cs b/src/FubarDev.FtpServer/FtpConnection.cs index f7daea0c..d86f6ac4 100644 --- a/src/FubarDev.FtpServer/FtpConnection.cs +++ b/src/FubarDev.FtpServer/FtpConnection.cs @@ -228,6 +228,7 @@ public FtpConnection( parentFeatures.Set(_keepAlive); #pragma warning restore 612 #pragma warning restore 618 + parentFeatures.Set(new ServiceProvidersFeature(ConnectionServices)); var features = new FeatureCollection(parentFeatures); #pragma warning disable 618