cloud-sql-python-connector icon indicating copy to clipboard operation
cloud-sql-python-connector copied to clipboard

refactor: move SSL/TLS context creation to ConnectionInfo

Open jackwotherspoon opened this issue 1 year ago • 0 comments

This refactor moves all SSL/TLS configuration into its own method create_ssl_context() on the ConnectionInfo class.

This way ConnectionInfo() prepares all the info required to connect and then create_ssl_context will use the info to establish the SSL/TLS connection when called from Connector.connect at the time of connection.

This refactor also improves the testing infra to be more in line with AlloyDB Python Connector.

Based on Go: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector/pull/761

jackwotherspoon avatar May 09 '24 13:05 jackwotherspoon