Skip to content

Commit 198692e

Browse files
rustagirrachel-mack
authored andcommitted
DOCSP-49986: TLS (mongodb#520)
* DOCSP-49986: TLS * MM small PR fixes
1 parent dd66ed5 commit 198692e

File tree

3 files changed

+223
-214
lines changed
  • source
    • archive-reference-files/fundamentals/connections
    • includes/fundamentals/code-snippets
    • security

3 files changed

+223
-214
lines changed

source/archive-reference-files/fundamentals/connections/tls.txt

Lines changed: 0 additions & 213 deletions
This file was deleted.

source/includes/fundamentals/code-snippets/tls.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
func main() {
1515

16+
// start-tls
1617
caFile := "<path to CA certificate>"
1718
certFile := "<path to public client certificate>"
1819
keyFile := "<path to private client key>"
@@ -43,6 +44,7 @@ func main() {
4344

4445
// Sets TLS options in options instance
4546
opts := options.Client().ApplyURI(uri).SetTLSConfig(tlsConfig)
47+
// end-tls
4648

4749
// Connects to MongoDB with TLS enabled
4850
client, err := mongo.Connect(opts)

0 commit comments

Comments
 (0)