From 35be06f4aae400ab629e81e80f6a3754591772fe Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Mon, 8 Mar 2021 13:54:55 -0800 Subject: [PATCH] Amendments to CONTRIBUTING doc --- docs/CONTRIBUTING.md | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 9a119f7b..93749026 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -29,15 +29,47 @@ To build from source: Find your binaries in `bin/`. -### Alternative: Build a CGO `step-ca` (with PKCS#11 and YubiKey PIV support) +### Build `step-ca` using CGO -To build the CGO version of `step-ca` you will need [`go`](https://golang.org/), make, gcc, pkg-config, and the [`libpcsclite-dev`](https://pcsclite.apdu.fr/) package. On Ubuntu: +#### The CGO build enables PKCS #11 and YubiKey PIV support - sudo apt update - sudo apt install -y make gcc libpcsclite-dev pkg-config - make bootstrap && make build GOFLAGS="" +To build the CGO version of `step-ca`, you will need [`go`](https://golang.org/), make, and a C compiler. -Find your binaries in `bin/`. +You'll also need PCSC support on your operating system, as required by the `go-piv` module. +On Linux, the [`libpcsclite-dev`](https://pcsclite.apdu.fr/) package provides PCSC support. +On macOS and Windows, PCSC support is built into the OS. + +#### 1. Install PCSC support + +On Debian-based distributions, run: + +```shell +sudo apt-get install libpcsclite-dev +``` + +On Fedora: + +```shell +sudo yum install pcsc-lite-devel +``` + +On CentOS: + +``` +sudo yum install 'dnf-command(config-manager)' +sudo yum config-manager --set-enabled PowerTools +sudo yum install pcsc-lite-devel +``` + +#### 2. Build `step-ca` + +To build `step-ca`, clone this repository and run the following: + +```shell +make bootstrap && make build GOFLAGS="" +``` + +When the build is complete, you will find binaries in `bin/`. ## Asking Support Questions