cert-store-0.2.0 is not a library.
CLI-based certificate store. Inspired by Password Store.
This tool generates keys and SSL certificates and stores them locally in a git repository. Keys are encrypted with GPG and can be safely transferred to a remote git repository. The main use case is to manage certificates for domains in a home network without relying on centralized certificate authorities and domain registrars.
Required CLI tools: git, openssl (for exporting certificates and keys in PKCS12 format), xclip (for clipboard).
Installation
Usage
Initializing the store, adding certificates
# Initialize the store.
#
# This command will initialize the store in ~/.cert-store and generate root certificate.
# Generate server key and certificate for localhost.
# Generate client key and certificate.
# Push all certificate to the git server.
TLS with Caddy
# Generate server key and certificate.
#
# ollama.internal - a domain name
# Export server certificate and key in PEM format.
# Simple Caddy configuration.
# Export root certificate in PEM format.
#
# Default root certificate uses your username as the common name.
# Now import /tmp/ca.crt in your browser as trusted certificate authority.
#
# Below is an example for curl.
Mutual TLS (mTLS) with Caddy
# Generate server key and certificate.
#
# ollama.internal - a domain name
# Generate client key and certificate.
#
# desktop - certificate name; can be any name, but here we use device name for simplicity
# Export server certificate and key in PEM format.
# Simple Caddy configuration.
# Export root certificate in PEM format.
#
# Default root certificate uses your username as the common name.
# Export client certificate and key in PKCS12 format.
# Now import /etc/caddy/ca.crt in your browser as trusted certificate authority.
# Then import /dev/shm/desktop.p12 in your brwoser as a client certificate.
#
# Below is an example for curl.
#
# With curl it is easier to use PEM client certificates, so we export in this format.
# Beware that the key is not encrypted when exported as PEM.