1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-22 21:51:22 +01:00

support non-ssl installations

This commit is contained in:
Kyle Spearrin 2018-03-08 17:31:51 -05:00
parent b51b135316
commit 94ecdf7fd6
3 changed files with 14 additions and 10 deletions

View File

@ -23,13 +23,17 @@ namespace Bit.Setup
var selfSignedSsl = false; var selfSignedSsl = false;
if(!Ssl) if(!Ssl)
{ {
Directory.CreateDirectory($"/bitwarden/ssl/self/{Domain}/"); Console.Write("(!) Do you want to generate a self-signed SSL certificate? (y/n): ");
Console.WriteLine("Generating self signed SSL certificate."); if(Console.ReadLine().ToLowerInvariant() == "y")
Ssl = selfSignedSsl = true; {
Helpers.Exec("openssl req -x509 -newkey rsa:4096 -sha256 -nodes -days 365 " + Directory.CreateDirectory($"/bitwarden/ssl/self/{Domain}/");
$"-keyout /bitwarden/ssl/self/{Domain}/private.key " + Console.WriteLine("Generating self signed SSL certificate.");
$"-out /bitwarden/ssl/self/{Domain}/certificate.crt " + Ssl = selfSignedSsl = true;
$"-subj \"/C=US/ST=New York/L=New York/O=8bit Solutions LLC/OU=Bitwarden/CN={Domain}\""); Helpers.Exec("openssl req -x509 -newkey rsa:4096 -sha256 -nodes -days 365 " +
$"-keyout /bitwarden/ssl/self/{Domain}/private.key " +
$"-out /bitwarden/ssl/self/{Domain}/certificate.crt " +
$"-subj \"/C=US/ST=New York/L=New York/O=8bit Solutions LLC/OU=Bitwarden/CN={Domain}\"");
}
} }
if(LetsEncrypt) if(LetsEncrypt)

View File

@ -9,8 +9,8 @@ namespace Bit.Setup
"ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:" + "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:" +
"DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:" + "DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:" +
"ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:" + "ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:" +
"ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:" + "ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:" +
"AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4:@STRENGTH"; "AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4:@STRENGTH";
public NginxConfigBuilder(string domain, string url, bool ssl, bool selfSignedSsl, bool letsEncrypt) public NginxConfigBuilder(string domain, string url, bool ssl, bool selfSignedSsl, bool letsEncrypt)
{ {

View File

@ -78,7 +78,7 @@ namespace Bit.Setup
{ {
Directory.CreateDirectory($"/bitwarden/ssl/{domain}/"); Directory.CreateDirectory($"/bitwarden/ssl/{domain}/");
Console.WriteLine("Make sure 'certificate.crt' and 'private.key' are provided in the " + Console.WriteLine("Make sure 'certificate.crt' and 'private.key' are provided in the " +
"appropriate directory (see setup instructions)."); "appropriate directory (see docs for info).");
} }
} }