From efcf1d6b90bf50e165d6392892f8df6f7a2ab343 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 12 Feb 2021 07:30:20 +0000 Subject: [PATCH] add cfssl.sh --- contrib/README.md | 7 ++++- contrib/cfssl.sh | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100755 contrib/cfssl.sh diff --git a/contrib/README.md b/contrib/README.md index 25a5e3d6..0c63d862 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -10,7 +10,12 @@ * modify `10.13.1.1` as necessary if you wish to support browsers without javascript ### [`explorer-nothumbs-nofoldertypes.reg`](explorer-nothumbs-nofoldertypes.reg) -disables thumbnails and folder-type detection in windows explorer, makes it way faster (especially for slow/networked locations (such as copyparty-fuse)) +* disables thumbnails and folder-type detection in windows explorer +* makes it way faster (especially for slow/networked locations (such as copyparty-fuse)) + +### [`cfssl.sh`](cfssl.sh) +* creates CA and server certificates using cfssl +* give a 3rd argument to install it to your copyparty config # OS integration init-scripts to start copyparty as a service diff --git a/contrib/cfssl.sh b/contrib/cfssl.sh new file mode 100755 index 00000000..674a6932 --- /dev/null +++ b/contrib/cfssl.sh @@ -0,0 +1,72 @@ +#!/bin/bash +set -e + +# ca-name and server-name +ca_name="$1" +srv_name="$2" + +[ -z "$srv_name" ] && { + echo "need arg 1: ca name" + echo "need arg 2: server name" + exit 1 +} + + +gen_ca() { + (tee /dev/stderr <~/.config/copyparty/cert.pem +} + + +# rm *.key *.pem +# cfssl print-defaults config +# cfssl print-defaults csr