installer/windows: don't require ca.key file (#3847)

As noted by @sixcorners at
https://github.com/storj/storj/pull/3819#issuecomment-609025487, the
Windows installer code incorrectly fails if the ca.key file is not
present.

The ca.key file should not be necessary for regular storage node usage,
and in fact we recommend that users move the ca.key file to secure
storage rather than keeping it on the node.

I'm not sure how to run the tests, so I'll get a nod from the SNO Growth
team before merging.

Change-Id: Ib2fe236de5c75165644e880caa827a2a1a034c87
Co-authored-by: Stefan Benten <mail@stefan-benten.de>
This commit is contained in:
paul cannon 2020-04-07 10:02:41 -05:00 committed by GitHub
parent 80ee7321cd
commit 43cf036113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 22 deletions

View File

@ -142,11 +142,6 @@ namespace Storj
throw new ArgumentException("File 'ca.cert' not found in the selected folder."); throw new ArgumentException("File 'ca.cert' not found in the selected folder.");
} }
if (!fs.File.Exists(Path.Combine(identityDir, "ca.key")))
{
throw new ArgumentException("File 'ca.key' not found in the selected folder.");
}
if (!fs.File.Exists(Path.Combine(identityDir, "identity.cert"))) if (!fs.File.Exists(Path.Combine(identityDir, "identity.cert")))
{ {
throw new ArgumentException("File 'identity.cert' not found in the selected folder."); throw new ArgumentException("File 'identity.cert' not found in the selected folder.");

View File

@ -36,20 +36,6 @@ namespace StorjTests
{ {
var fs = new MockFileSystem(new Dictionary<string, MockFileData> var fs = new MockFileSystem(new Dictionary<string, MockFileData>
{ {
{ @"X:\\Some\\Identity\\Folder\\ca.key", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\identity.cert", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\identity.key", new MockFileData("") }
});
new CustomActionRunner(fs).ValidateIdentityDir("X:\\Some\\Identity\\Folder");
}
[TestMethod]
[ExpectedExceptionWithMessage(typeof(ArgumentException), "File 'ca.key' not found in the selected folder.")]
public void MissingCAKeyFile()
{
var fs = new MockFileSystem(new Dictionary<string, MockFileData>
{
{ @"X:\\Some\\Identity\\Folder\\ca.cert", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\identity.cert", new MockFileData("") }, { @"X:\\Some\\Identity\\Folder\\identity.cert", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\identity.key", new MockFileData("") } { @"X:\\Some\\Identity\\Folder\\identity.key", new MockFileData("") }
}); });
@ -63,7 +49,6 @@ namespace StorjTests
var fs = new MockFileSystem(new Dictionary<string, MockFileData> var fs = new MockFileSystem(new Dictionary<string, MockFileData>
{ {
{ @"X:\\Some\\Identity\\Folder\\ca.cert", new MockFileData("") }, { @"X:\\Some\\Identity\\Folder\\ca.cert", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\ca.key", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\identity.key", new MockFileData("") } { @"X:\\Some\\Identity\\Folder\\identity.key", new MockFileData("") }
}); });
new CustomActionRunner(fs).ValidateIdentityDir("X:\\Some\\Identity\\Folder"); new CustomActionRunner(fs).ValidateIdentityDir("X:\\Some\\Identity\\Folder");
@ -76,7 +61,6 @@ namespace StorjTests
var fs = new MockFileSystem(new Dictionary<string, MockFileData> var fs = new MockFileSystem(new Dictionary<string, MockFileData>
{ {
{ @"X:\\Some\\Identity\\Folder\\ca.cert", new MockFileData("") }, { @"X:\\Some\\Identity\\Folder\\ca.cert", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\ca.key", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\identity.cert", new MockFileData("") } { @"X:\\Some\\Identity\\Folder\\identity.cert", new MockFileData("") }
}); });
new CustomActionRunner(fs).ValidateIdentityDir("X:\\Some\\Identity\\Folder"); new CustomActionRunner(fs).ValidateIdentityDir("X:\\Some\\Identity\\Folder");
@ -88,7 +72,6 @@ namespace StorjTests
var fs = new MockFileSystem(new Dictionary<string, MockFileData> var fs = new MockFileSystem(new Dictionary<string, MockFileData>
{ {
{ @"X:\\Some\\Identity\\Folder\\ca.cert", new MockFileData("") }, { @"X:\\Some\\Identity\\Folder\\ca.cert", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\ca.key", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\identity.cert", new MockFileData("") }, { @"X:\\Some\\Identity\\Folder\\identity.cert", new MockFileData("") },
{ @"X:\\Some\\Identity\\Folder\\identity.key", new MockFileData("") }, { @"X:\\Some\\Identity\\Folder\\identity.key", new MockFileData("") },
}); });