mfenniak / pg8000

A Pure-Python PostgreSQL Driver
http://pythonhosted.org/pg8000/
Other
222 stars 55 forks source link

SSL connections don't verify server name #178

Open JonathanRRogers opened 5 years ago

JonathanRRogers commented 5 years ago

Python standard library function ssl.wrap_socket() is deprecated because it doesn't handle server host names. Since pg8000 uses that function, it can't properly secure connections to Postgres. In contrast, psycopg2 exposes libpq's "sslmode" parameter, which when set to "verify-full" verifies server hostname.