cloudflare /cfssl

CFSSL: Cloudflare's PKI and TLS toolkit

★ 9,512⑂ 1,156👁 199⑃ 870● 581▤ 18
GoBSD-2-ClauseCreated 2014-07-07cfssl.org/
Download: v1.7.1v1.7.1 ↓1.7.12026-10-06
+0
Daily
9,512
stars
1,156
forks
199
watchers
870
prs
581
issues
18
releases

README

CFSSL





 CloudFlare's PKI/TLS toolkit

CFSSL is CloudFlare's PKI/TLS swiss army knife. It is both a command line
tool and an HTTP API server for signing, verifying, and bundling TLS
certificates. It requires Go 1.27+ to build.

Note that certain linux distributions have certain algorithms removed
(RHEL-based distributions in particular), so the golang from the
official repositories will not work. Users of these distributions should
install go manually to install CFSSL.

CFSSL consists of:

 a set of packages useful for building custom TLS PKI tools
 the cfssl program, which is the canonical command line utility
  using the CFSSL packages.
 the multirootca program, which is a certificate authority server
  that can use multiple signing keys.
 the mkbundle program is used to build certificate pool bundles.
 the cfssljson program, which takes the JSON output from the
  cfssl and multirootca programs and writes certificates, keys,
  CSRs, and bundles to disk.

 Building

Building cfssl requires a
working Go 1.27+ installation.


$ git clone [email protected]:cloudflare/cfssl.git
$ cd cfssl
$ make
$ make install


The resulting binaries will be in the bin folder:

$ tree bin
bin
├── cfssl
├── cfssl-bundle
├── cfssl-certinfo
├── cfssl-newkey
├── cfssl-scan
├── cfssljson
├── mkbundle
└── multirootca

0 directories, 8 files


 Cross Compilation

You can set the GOOS and GOARCH environment variables to have Go cross compile for alternative platforms; however, cfssl requires cgo, and cgo requires a working compiler toolchain for the target platform.

 Installation

Installation requires a working Go 1.27+ installation.
Alternatively, prebuilt binaries are available


$ go install github.com/cloudflare/cfssl/cmd/...@latest


This will download, build, and install all of the utility programs
(including cfssl, cfssljson, and mkbundle among others).

 Using the Command Line Tool

The cfssl command line tool takes a command to specify what
operation it should carry out:

       sign             signs a certificate
       bundle           build a certificate bundle
       genkey           generate a private key and a certificate request
       gencert          generate a private key and a certificate
       serve            start the API server
       version          prints out the current version
       selfsign         generates a self-signed certificate
       print-defaults   print default configurations

Use cfssl [command] -help to find out more about a command.
The version command takes no arguments.

 Signing


cfssl sign [-ca cert] [-ca-key key] [-hostname comma,separated,hostnames] csr [subject]


The csr is the client's certificate request. The -ca and -ca-key
flags are the CA's certificate and private key, respectively. By
default, they are ca.pem and ca_key.pem. The -hostname is
a comma separated hostname list that overrides the DNS names and
IP address in the certificate SAN extension.
For example, assuming the CA's private key is in
/etc/ssl/priv

Top issues

Latest release

v1.7.1 v1.7.1 2026-10-06
Changelog
 ab47f0d984778865b3f5b5adf6ba336a15b96c31 Merge pull request 1450 from upodroid/k8s-arches
 f26318e529daed741c4d24d8c0fae0270d1435eb build releases for riscv64 and ppc64le

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON