cloud-sql-python-connector
cloud-sql-python-connector copied to clipboard
refactor: move SSL/TLS context creation to ConnectionInfo
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