mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
Changed all C# control flow block statements to include space between keyword and open paren
This commit is contained in:
@ -14,7 +14,7 @@ namespace Bit.Setup
|
||||
|
||||
public void BuildForInstall()
|
||||
{
|
||||
if(_context.Stub)
|
||||
if (_context.Stub)
|
||||
{
|
||||
_context.Config.Ssl = true;
|
||||
_context.Install.Trusted = true;
|
||||
@ -26,17 +26,17 @@ namespace Bit.Setup
|
||||
|
||||
_context.Config.Ssl = _context.Config.SslManagedLetsEncrypt;
|
||||
|
||||
if(!_context.Config.Ssl)
|
||||
if (!_context.Config.Ssl)
|
||||
{
|
||||
_context.Config.Ssl = Helpers.ReadQuestion("Do you have a SSL certificate to use?");
|
||||
if(_context.Config.Ssl)
|
||||
if (_context.Config.Ssl)
|
||||
{
|
||||
Directory.CreateDirectory($"/bitwarden/ssl/{_context.Install.Domain}/");
|
||||
var message = "Make sure 'certificate.crt' and 'private.key' are provided in the \n" +
|
||||
"appropriate directory before running 'start' (see docs for info).";
|
||||
Helpers.ShowBanner(_context, "NOTE", message);
|
||||
}
|
||||
else if(Helpers.ReadQuestion("Do you want to generate a self-signed SSL certificate?"))
|
||||
else if (Helpers.ReadQuestion("Do you want to generate a self-signed SSL certificate?"))
|
||||
{
|
||||
Directory.CreateDirectory($"/bitwarden/ssl/self/{_context.Install.Domain}/");
|
||||
Helpers.WriteLine(_context, "Generating self signed SSL certificate.");
|
||||
@ -52,7 +52,7 @@ namespace Bit.Setup
|
||||
}
|
||||
}
|
||||
|
||||
if(_context.Config.SslManagedLetsEncrypt)
|
||||
if (_context.Config.SslManagedLetsEncrypt)
|
||||
{
|
||||
_context.Install.Trusted = true;
|
||||
_context.Install.DiffieHellman = true;
|
||||
@ -60,7 +60,7 @@ namespace Bit.Setup
|
||||
Helpers.Exec($"openssl dhparam -out " +
|
||||
$"/bitwarden/letsencrypt/live/{_context.Install.Domain}/dhparam.pem 2048");
|
||||
}
|
||||
else if(_context.Config.Ssl && !_context.Install.SelfSignedCert)
|
||||
else if (_context.Config.Ssl && !_context.Install.SelfSignedCert)
|
||||
{
|
||||
_context.Install.Trusted = Helpers.ReadQuestion("Is this a trusted SSL certificate " +
|
||||
"(requires ca.crt, see docs)?");
|
||||
@ -76,14 +76,14 @@ namespace Bit.Setup
|
||||
|
||||
Helpers.WriteLine(_context);
|
||||
|
||||
if(!_context.Config.Ssl)
|
||||
if (!_context.Config.Ssl)
|
||||
{
|
||||
var message = "You are not using a SSL certificate. Bitwarden requires HTTPS to operate. \n" +
|
||||
"You must front your installation with a HTTPS proxy or the web vault (and \n" +
|
||||
"other Bitwarden apps) will not work properly.";
|
||||
Helpers.ShowBanner(_context, "WARNING", message, ConsoleColor.Yellow);
|
||||
}
|
||||
else if(_context.Config.Ssl && !_context.Install.Trusted)
|
||||
else if (_context.Config.Ssl && !_context.Install.Trusted)
|
||||
{
|
||||
var message = "You are using an untrusted SSL certificate. This certificate will not be \n" +
|
||||
"trusted by Bitwarden client applications. You must add this certificate to \n" +
|
||||
|
Reference in New Issue
Block a user