Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Manually generating Certificate & Key section in README.md for unified #220

Open
wants to merge 2 commits into
base: unified
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Credit to https://github.com/h44z/BitBetter and https://github.com/jakeswenson/B
- [Getting Started](#getting-started)
- [Dependencies](#dependencies)
- [Setting up BitBetter](#setting-up-bitbetter)
- [Optional: Manually generating Certificate & Key](#optional-manually-generating-certificate--key)
- [Building BitBetter](#building-bitbetter)
- [Note: Manually generating Certificate & Key](#note-manually-generating-certificate--key)
- [Updating Bitwarden and BitBetter](#updating-bitwarden-and-bitbetter)
- [Generating Signed Licenses](#generating-signed-licenses)
- [Note: Alternative Ways to Generate License](#note-alternative-ways-to-generate-license)
Expand All @@ -40,6 +40,21 @@ With your dependencies installed, begin the installation of BitBetter by downloa
git clone https://github.com/jakeswenson/BitBetter.git
```

### Optional: Manually generating Certificate & Key

If you wish to generate your self-signed cert & key manually, you can run the following commands.

```bash
cd .keys
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.cert -days 36500 -outform DER -passout pass:test
openssl x509 -inform DER -in cert.cert -out cert.pem
openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem -passin pass:test -passout pass:test
```

> Note that the password here must be `test`.<sup>[1](#f1)</sup>
---


## Building BitBetter

Now that you've set up your build environment, we need to specify which servers to start after the work is done.
Expand Down Expand Up @@ -83,22 +98,6 @@ If you ran the build script, you can **simply run the license gen in interactive
**The license generator will spit out a JSON-formatted license which can then be used within the Bitwarden web front-end to license your user or org!**


---

### Note: Manually generating Certificate & Key

If you wish to generate your self-signed cert & key manually, you can run the following commands.
Note that you should never have to do this yourself, but can also be triggered by running the generateKeys.[sh|ps1] script.

```bash
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.cert -days 36500 -outform DER -passout pass:test
openssl x509 -inform DER -in cert.cert -out cert.pem
openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem -passin pass:test -passout pass:test
```

> Note that the password here must be `test`.<sup>[2](#f1)</sup>


---

# FAQ: Questions you might have.
Expand Down
2 changes: 1 addition & 1 deletion src/bitBetter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /bitBetter

COPY . /bitBetter
Expand Down
2 changes: 1 addition & 1 deletion src/licenseGen/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /licenseGen

COPY . /licenseGen
Expand Down