certgen

command
v1.8.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2021 License: MPL-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

certgen: a tool for generating test certificates on disk for use as test-fixtures and for end-to-end testing and local development.

Example usage:

$ go run connect/certgen/certgen.go -out-dir /tmp/connect-certs

You can verify a given leaf with a given root using:

$ openssl verify -verbose -CAfile ca1-ca.cert.pem ca1-svc-db.cert.pem

Note that to verify via the cross-signed intermediate, openssl requires it to be bundled with the _root_ CA bundle and will ignore the cert if it's passed with the subject. You can do that with:

$ openssl verify -verbose -CAfile \
   <(cat ca1-ca.cert.pem ca2-xc-by-ca1.cert.pem) \
   ca2-svc-db.cert.pem
ca2-svc-db.cert.pem: OK

Note that the same leaf and root without the intermediate should fail:

$ openssl verify -verbose -CAfile ca1-ca.cert.pem ca2-svc-db.cert.pem
ca2-svc-db.cert.pem: CN = db
error 20 at 0 depth lookup:unable to get local issuer certificate

NOTE: THIS IS A QUIRK OF OPENSSL; in Connect we distribute the roots alone and stable intermediates like the XC cert to the _leaf_.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL