### Install mkcert on Windows Source: https://github.com/filosottile/mkcert/blob/master/README.md Instructions for installing mkcert on Windows using either Chocolatey or Scoop package managers, or building from source (requires Go 1.10+). ```Shell choco install mkcert ``` ```Shell scoop bucket add extras scoop install mkcert ``` -------------------------------- ### Install mkcert on Linux Source: https://github.com/filosottile/mkcert/blob/master/README.md Various methods to install mkcert on Linux, including using Homebrew, building from source (requires Go 1.13+), using pre-built binaries, or installing from the official Arch Linux repository. ```Shell brew install mkcert ``` ```Shell git clone https://github.com/FiloSottile/mkcert && cd mkcert ``` ```Go go build -ldflags "-X main.Version=$(git describe --tags)" ``` ```Shell curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" chmod +x mkcert-v*-linux-amd64 sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert ``` ```Shell sudo pacman -Syu mkcert ``` -------------------------------- ### Example: Custom Output Paths for mkcert Source: https://github.com/filosottile/mkcert/blob/master/README.md An example demonstrating how to use the `-key-file` and `-cert-file` flags to specify custom output paths for the generated certificate and key files when creating a new certificate. ```Shell mkcert -key-file key.pem -cert-file cert.pem example.com *.example.com ``` -------------------------------- ### Install mkcert on macOS Source: https://github.com/filosottile/mkcert/blob/master/README.md Instructions for installing mkcert and NSS (for Firefox support) on macOS using either Homebrew or MacPorts package managers. ```Shell brew install mkcert brew install nss ``` ```Shell sudo port selfupdate sudo port install mkcert sudo port install nss ``` -------------------------------- ### Install certutil on Linux Source: https://github.com/filosottile/mkcert/blob/master/README.md Commands to install the `certutil` dependency, which is part of `nss-tools` or `libnss3-tools`, on various Linux distributions (Debian/Ubuntu, RHEL/CentOS, Arch, OpenSUSE) before installing mkcert. ```Shell sudo apt install libnss3-tools ``` ```Shell sudo yum install nss-tools ``` ```Shell sudo pacman -S nss ``` ```Shell sudo zypper install mozilla-nss-tools ``` -------------------------------- ### Install mkcert CA and Generate Certificates Source: https://github.com/filosottile/mkcert/blob/master/README.md Demonstrates how to install the local Certificate Authority (CA) for mkcert into the system trust store and generate a new locally-trusted SSL certificate for multiple domains and IP addresses, including wildcards and localhost. ```Shell mkcert -install mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1 ``` -------------------------------- ### Install mkcert Root CA on Another Machine Source: https://github.com/filosottile/mkcert/blob/master/README.md This process outlines how to install an existing mkcert root CA certificate on a different machine without transferring the private key. It involves locating the CA file, copying it, setting the `$CAROOT` environment variable, and running `mkcert -install`. ```Shell mkcert -CAROOT # copy rootCA.pem to a different machine export CAROOT="/path/to/copied/rootCA.pem/directory" mkcert -install ``` -------------------------------- ### Generate S/MIME Certificate with mkcert Source: https://github.com/filosottile/mkcert/blob/master/README.md Example of generating an S/MIME certificate by providing an email address as one of the names to mkcert. mkcert automatically detects and generates an S/MIME certificate in this case. ```Shell mkcert filippo@example.com ``` -------------------------------- ### mkcert Advanced Command-Line Options Source: https://github.com/filosottile/mkcert/blob/master/README.md Details on advanced command-line flags for mkcert, allowing customization of output paths, generation of client authentication certificates, use of ECDSA keys, creation of PKCS #12 files, and certificate generation based on a supplied CSR. ```APIDOC -cert-file FILE, -key-file FILE, -p12-file FILE Customize the output paths. -client Generate a certificate for client authentication. -ecdsa Generate a certificate with an ECDSA key. -pkcs12 Generate a ".p12" PKCS #12 file, also know as a ".pfx" file, containing certificate and key for legacy applications. -csr CSR Generate a certificate based on the supplied CSR. Conflicts with all other flags and arguments except -install and -cert-file. ``` -------------------------------- ### Configure Node.js to Trust mkcert Root CA Source: https://github.com/filosottile/mkcert/blob/master/README.md This snippet shows how to configure Node.js to trust certificates issued by mkcert by setting the `NODE_EXTRA_CA_CERTS` environment variable. Node.js does not automatically use the system root store, requiring this explicit configuration. ```Shell export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.