Skip to content

Commit

Permalink
Merge pull request FubarDevelopment#124 from edokan/implicit-bug-fix
Browse files Browse the repository at this point in the history
Implicit bug fix
  • Loading branch information
fubar-coder authored Jan 13, 2022
2 parents b36bb56 + 62722e4 commit ee1ba08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/TestFtpServer/FtpOptionsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion samples/TestFtpServer/OptionsConfigSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down
1 change: 1 addition & 0 deletions src/FubarDev.FtpServer/FtpConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public FtpConnection(
parentFeatures.Set<IFtpConnectionKeepAlive>(_keepAlive);
#pragma warning restore 612
#pragma warning restore 618
parentFeatures.Set<IServiceProvidersFeature>(new ServiceProvidersFeature(ConnectionServices));

var features = new FeatureCollection(parentFeatures);
#pragma warning disable 618
Expand Down

0 comments on commit ee1ba08

Please sign in to comment.