Index: psycopg2-2.9.10/setup.py
--- psycopg2-2.9.10/setup.py.orig	2016-07-07 04:16:24.000000000 +0200
+++ psycopg2-2.9.10/setup.py	2016-07-07 14:57:37.881086261 +0200
@@ -396,6 +396,9 @@
                     os.path.join(pg_config_helper.query("libdir"), "libpq.a"))
         else:
             self.libraries.append("pq")
+            self.libraries.append("ssl")
+            self.libraries.append("crypto")
+            self.libraries.append("crypt")
 
         try:
             self.library_dirs.append(pg_config_helper.query("libdir"))
