We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd66ed5 commit 198692eCopy full SHA for 198692e
source/archive-reference-files/fundamentals/connections/tls.txt
source/includes/fundamentals/code-snippets/tls.go
@@ -13,6 +13,7 @@ import (
13
14
func main() {
15
16
+ // start-tls
17
caFile := "<path to CA certificate>"
18
certFile := "<path to public client certificate>"
19
keyFile := "<path to private client key>"
@@ -43,6 +44,7 @@ func main() {
43
44
45
// Sets TLS options in options instance
46
opts := options.Client().ApplyURI(uri).SetTLSConfig(tlsConfig)
47
+ // end-tls
48
49
// Connects to MongoDB with TLS enabled
50
client, err := mongo.Connect(opts)
0 commit comments