Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/go/topics/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ In your Go code, we specify a TLS stack configuration for your client(s) making
```go
// ...

caCert, _ := ioutil.ReadFile("{{ ca_cert }}")
caCert, _ := os.ReadFile("{{ ca_cert }}")
caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)

Expand Down
3 changes: 1 addition & 2 deletions docs/go/topics/client_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ In your server's Go file, we pass a TLS stack configuration into the server init
```go
// ...

caCert, _ := ioutil.ReadFile("{{ ca_cert }}")
caCert, _ := os.ReadFile("{{ ca_cert }}")
caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)

tlsConfig := &tls.Config{
ClientCAs: caCertPool,
ClientAuth: tls.RequireAndVerifyClientCert,
}
tlsConfig.BuildNameToCertificate()

server := &http.Server{
Addr: ":9443",
Expand Down