mirror of
https://github.com/jakeswenson/BitBetter.git
synced 2025-12-16 19:26:18 +00:00
* Initial work * Fix typo * Fix typo * Fix stupid issue * Add comments and fix minor issues * Add extra information * Add Linux script for generating keys * Add circleci * Add comments * Add extra option * Add missing permissions and empty script for now * Fix line endings * Add missing mount point * Simplify patch * Fix scripts * Reduce complexity * Fix circleci * Remove useless line * Move to src folder and improve image creation
This commit is contained in:
19
generateKeys.sh
Executable file
19
generateKeys.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check for openssl
|
||||
command -v openssl >/dev/null 2>&1 || { echo >&2 "openssl required but not found. Aborting."; exit 1; }
|
||||
|
||||
DIR="$PWD/.keys"
|
||||
|
||||
# if previous keys exist, remove them
|
||||
if [ -d "$DIR" ]; then
|
||||
rm -rf "$DIR"
|
||||
fi
|
||||
|
||||
# create new directory
|
||||
mkdir "$DIR"
|
||||
|
||||
# Generate new keys
|
||||
openssl req -x509 -newkey rsa:4096 -keyout "$DIR/key.pem" -out "$DIR/cert.cert" -days 36500 -subj '/CN=www.mydom.com/O=My Company Name LTD./C=US' -outform DER -passout pass:test
|
||||
openssl x509 -inform DER -in "$DIR/cert.cert" -out "$DIR/cert.pem"
|
||||
openssl pkcs12 -export -out "$DIR/cert.pfx" -inkey "$DIR/key.pem" -in "$DIR/cert.pem" -passin pass:test -passout pass:test
|
||||
Reference in New Issue
Block a user