diff --git a/docs/go/topics/client.md b/docs/go/topics/client.md index c6f56d7..214b63c 100644 --- a/docs/go/topics/client.md +++ b/docs/go/topics/client.md @@ -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) diff --git a/docs/go/topics/client_auth.md b/docs/go/topics/client_auth.md index 4665436..a0a9793 100644 --- a/docs/go/topics/client_auth.md +++ b/docs/go/topics/client_auth.md @@ -3,7 +3,7 @@ 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) @@ -11,7 +11,6 @@ tlsConfig := &tls.Config{ ClientCAs: caCertPool, ClientAuth: tls.RequireAndVerifyClientCert, } -tlsConfig.BuildNameToCertificate() server := &http.Server{ Addr: ":9443",