Skip to content

Commit

Permalink
Add comments indicating CA's are self contained. (#82)
Browse files Browse the repository at this point in the history
* Add comments indicating CA's are self contained.

i.e. one should start with a system pool copy and append most likely.

* Update comment. Better wording
  • Loading branch information
sfc-gh-jchacon authored Mar 3, 2022
1 parent 99c18f5 commit f6e4609
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions auth/mtls/mtls.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@ var (
type CredentialsLoader interface {
// LoadClientCA returns a CertPool which should be used by a server to
// validate client certificates.
// NOTE: The pool returned here will be the only pool used to validate certificates.
// Inclusion of system certificates should be done by copying from x509.SystemCertPool(),
// with any custom certificates appended.
LoadClientCA(context.Context) (*x509.CertPool, error)

// LoadRootCA returns a CertPool which should be used by clients to
// validate server certificates.
// NOTE: The pool returned here will be the only pool used to validate certificates.
// Inclusion of system certificates should be done by copying from x509.SystemCertPool(),
// with any custom certificates appended.
LoadRootCA(context.Context) (*x509.CertPool, error)

// LoadClientCertificates returns the certificate that should be presented
Expand Down

0 comments on commit f6e4609

Please sign in to comment.