diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2024-01-20 12:31:58 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2024-01-20 12:31:58 -0500 |
| commit | e2a0cf2a79b43f9f86b74270f3d96fe300687804 (patch) | |
| tree | a87edf55f81e78f4d0968d6f006562090260e068 /scripts/syncthing-cert.sh | |
| parent | ec83443853116b07f18fbef8c6de31cf157939a0 (diff) | |
| download | dotfiles-e2a0cf2a79b43f9f86b74270f3d96fe300687804.tar.gz dotfiles-e2a0cf2a79b43f9f86b74270f3d96fe300687804.tar.xz | |
Cleanup unused files and code.
Diffstat (limited to 'scripts/syncthing-cert.sh')
| -rw-r--r-- | scripts/syncthing-cert.sh | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/scripts/syncthing-cert.sh b/scripts/syncthing-cert.sh deleted file mode 100644 index 0dd460b..0000000 --- a/scripts/syncthing-cert.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -set -e -days="3650" -keyout="syncthing.key" -reqout="$(mktemp)" -certout="syncthing.crt" -alg="ED25519" - -help() { -cat <<EOF -$0 [ -c <certificate_out> ] [ -k <key_out> ] [ -448 ] -Defaults are: -certificate_out: 'syncthing.crt' -key_out: 'syncthing.key' - -Optionally, the -448 option will generate an ED448 key instead of ED25519. - -EOF -exit 1 -} - -while [ $# -gt 0 ] ; do case $1 in - -c) certout="$2" ; shift ; shift ;; - -k) keyout="$2" ; shift ; shift ;; - -448) alg="ED448"; shift ;; - *) help ;; -esac ; done - -v3Section=" -basicConstraints = CA:FALSE -keyUsage = digitalSignature, keyEncipherment, dataEncipherment -extendedKeyUsage = serverAuth, clientAuth -subjectAltName = @alt_names -[alt_names] -DNS.1 = syncthing -" - -openssl genpkey -algorithm $alg > "$keyout" - -cnf="$(mktemp)" -cat > "$cnf" <<EOF -[req] -distinguished_name = req_distinguished_name -prompt = no -req_extensions = v3_req -[req_distinguished_name] -OU = Automatically Generated -O = Syncthing -CN = syncthing -[v3_req] -$v3Section -EOF - -extfile="$(mktemp)" -cat > "$extfile" <<EOF -[v3_ca] -$v3Section -EOF - -openssl req -new -out "$reqout" -key "$keyout" -config "$cnf" - -rm "$cnf" - -openssl x509 -req -days "$days" -in "$reqout" -signkey "$keyout" \ - -extensions v3_ca \ - -extfile "$extfile" \ - -out "$certout" - -rm "$extfile" -rm "$reqout" |
