Skip to content

Commit 120becd

Browse files
chore: test dns as SAN
1 parent 53e40c7 commit 120becd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

google/cloud/sql/connector/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ async def _get_metadata(
145145
# Note that we have to check for PSC enablement also because CAS
146146
# instances also set the dnsName field.
147147
# Remove trailing period from DNS name. Required for SSL in Python
148-
dns_name = ret_dict.get("dnsName", "").rstrip(".")
148+
dns_name = ret_dict.get("dnsName", "")
149149
if dns_name and ret_dict.get("pscEnabled"):
150150
ip_addresses["PSC"] = dns_name
151151

google/cloud/sql/connector/pg8000.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
"""
16+
1617
import socket
1718
import ssl
1819
from typing import Any, TYPE_CHECKING
@@ -49,7 +50,7 @@ def connect(
4950

5051
# Create socket and wrap with context.
5152
sock = ctx.wrap_socket(
52-
socket.create_connection((ip_address, SERVER_PROXY_PORT)),
53+
socket.create_connection((ip_address.rstrip("."), SERVER_PROXY_PORT)),
5354
server_hostname=ip_address,
5455
)
5556

0 commit comments

Comments
 (0)