From beffca972c4f5f7a17ab158b2103e4b21c0463db Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Sun, 13 Nov 2022 12:13:34 +0100 Subject: [PATCH] Initial commit --- .gitignore | 1 + README.md | 8 ++++++++ install.sh | 28 ++++++++++++++++++++++++++++ kto.crt | 31 +++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100755 install.sh create mode 100644 kto.crt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4603f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.disabled diff --git a/README.md b/README.md new file mode 100644 index 0000000..4daabb5 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Install KTO Root Certificates + +This repository contains a small setup to automate the delivery of our root certificates to clients. + +### Files +* `kto.crt` is our current only root certificate +#### Installation +* `install.sh` copies the certificates to the right location and then reloads the system's certificates diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..cff34ce --- /dev/null +++ b/install.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +run_directory=$(dirname $(readlink -f "$0")) +user=$(whoami) + +if [ -f $run_directory/.disabled ]; then + echo "Installation is disabled. Exiting..." + exit 0 +fi + +if [[ $user != 'root' ]]; then + sudo="sudo" +else + sudo="" +fi + +$sudo cp $run_directory/*.crt /etc/ca-certificates/trust-source/anchors/ +if command -v update-ca-trust > /dev/null; then + $sudo update-ca-trust +elif command -v update-ca-certificates > /dev/null; then + $sudo update-ca-certificates +else + echo "No update-ca binary found. Exiting with error!" + exit 1 +fi + +echo "Finished install. Exiting..." +exit 0 diff --git a/kto.crt b/kto.crt new file mode 100644 index 0000000..119d005 --- /dev/null +++ b/kto.crt @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIURz3mSUsJQVoV7ZnhkH5aicqGt0MwDQYJKoZIhvcNAQEL +BQAwRTELMAkGA1UEBhMCRlIxEzARBgNVBAgMClNvbWUt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