[GODRIVER-1710] TLS ServerName should not set if it's provided in a custom config Created: 11/Aug/20  Updated: 28/Oct/23  Resolved: 25/Aug/20

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4.1

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When creating new connections with TLS, we set the tls.Config.ServerName field to the server's address. This is done to ensure that hostname verification and SNI both work. If a user provides a custom TLS config with a non-empty ServerName field, we should not override it. As part of this, we should add documentation to the ClientOptions.SetTLSConfig function to explain this behavior.



 Comments   
Comment by Githook User [ 25/Aug/20 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: GODRIVER-1710 Ensure TLS ServerName is not overriden if already set (#486)
Branch: release/1.4
https://github.com/mongodb/mongo-go-driver/commit/8b579258e0e574e98e335cc61f5ec1cd0754dda0

Comment by Githook User [ 25/Aug/20 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: GODRIVER-1710 Ensure TLS ServerName is not overriden if already set (#486)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/ee35f14f6560f9932b6bb5f4bc7db78ad690c3dc

Comment by Divjot Arora (Inactive) [ 19/Aug/20 ]

https://github.com/mongodb/mongo-go-driver/pull/486

Generated at Thu Feb 08 08:36:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.