mirror of
https://github.com/jakeswenson/BitBetter.git
synced 2023-10-10 13:36:57 +02:00
Added a Key Generating script
To make the keygen process a bit easier I've added a `generate-keys.sh` script that can be found in the `.keys` directory. It will generate the key & cert and bundle them into the required pkcs#12 file. I've updated the readme to include instructions on the script.
This commit is contained in:
parent
664b75ac81
commit
05543b5b8a
@ -1 +0,0 @@
|
|||||||
Need an empty folder
|
|
15
.keys/generate-keys.sh
Executable file
15
.keys/generate-keys.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Check for openssl
|
||||||
|
command -v openssl >/dev/null 2>&1 || { echo >&2 "openssl required but not found. Aborting."; exit 1; }
|
||||||
|
|
||||||
|
# Remove any existing key files
|
||||||
|
[ ! -e cert.pem ] || rm cert.pem
|
||||||
|
[ ! -e key.pem ] || rm key.pem
|
||||||
|
[ ! -e cert.cert ] || rm cert.cert
|
||||||
|
[ ! -e cert.pfx ] || rm cert.pfx
|
||||||
|
|
||||||
|
# Generate new 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
|
@ -24,9 +24,9 @@ If you want to be able to sign your own licenses obviously you'll have to replac
|
|||||||
|
|
||||||
### Signing licesnses
|
### Signing licesnses
|
||||||
|
|
||||||
There is a tool included to generate a license (see `src/liceseGen/`)
|
To sign your own license you first need to generate your own singing cert using the `.keys/generate-keys.sh` script. Running this script will prompt you to enter some information about your new certificate, you may leave these at the defaults or set them to your preference. The script will then create a pkcs12 file (.pfx) containing your new key/cert.
|
||||||
|
|
||||||
generate a PFX above using a password of `test` and then build the tool using:
|
There is a tool included to generate a license (see `src/liceseGen/`), build it using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./src/licenseGen/build.sh
|
./src/licenseGen/build.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user