From 3cabfe0bf77e06fc6fb2df9d63e792e8fdbfc550 Mon Sep 17 00:00:00 2001 From: Jake Swenson Date: Sun, 29 Oct 2017 12:51:53 -0700 Subject: [PATCH] update readme --- README.md | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b7f65eb..525d9f7 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,14 @@ # BitBetter [![CircleCI](https://img.shields.io/circleci/project/github/jakeswenson/BitBetter.svg)](https://circleci.com/gh/jakeswenson/BitBetter/tree/master) + This project is a tool to modify bitwardens core dll to allow me to self license. Beware this does janky IL magic to rewrite the bitwarden core dll and install my self signed certificate. ## Building -There's no formal build script/process yet. To build your own `bitwarden/api` image run +To build your own `bitwarden/api` image run ```bash -dotnet restore -dotnet publish -docker build . -t bitbetter/api +./build.sh ``` replace anywhere `bitwarden/api` is used with `bitbetter/api` and give it a go. no promises @@ -24,10 +23,35 @@ you can generate one with openssl like so: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.cert -days 36500 -outform DER ``` +### Convert your DER certificate to a PEM + +```bash +openssl x509 -inform DER -in cert.cert -out cert.pem +``` + +### Convert your public and private key into a PKCS12/PFX + +```bash +openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem +``` + ### Signing licesnses -I leave this up to the reader. They're just JSON files, with a signature section. All the code is open source. -I'll add a tool in the future to just do it for you. +There is a tool included to generate a license (see `src/liceseGen/`) + +generate a PFX above using a password of `test` and then build the tool using: + +```bash +./src/licenseGen/build.sh +``` + +This tool build ontop of the bitbetter/api container image so make sure you've built that above using the root `./build.sh` script. + +After that you can run the tool using: + +```bash +./src/LicenseGen/run.sh +``` # Questions (you might have?)