diff --git a/docs/en_US/images/server_advanced.png b/docs/en_US/images/server_advanced.png
old mode 100644
new mode 100755
index 898bf9dfc1ed5f8afd50b8d3abd06fbc1f6aa5e8..c04961a6d70ed81feb5172415093a84af28635db
GIT binary patch
diff --git a/docs/en_US/images/server_connection.png b/docs/en_US/images/server_connection.png
old mode 100644
new mode 100755
index 664afb8061817575a727394b62f11ae219534ebd..48428ae0ed123635465debb0c5d262c82b65c3e9
GIT binary patch
diff --git a/docs/en_US/images/server_ssl.png b/docs/en_US/images/server_ssl.png
new file mode 100755
index 0000000000000000000000000000000000000000..fe223a9f6f1920c0e16f520a647a8a7e3fadc437
GIT binary patch
diff --git a/docs/en_US/server_dialog.rst b/docs/en_US/server_dialog.rst
index 0690180..40267e6 100644
--- a/docs/en_US/server_dialog.rst
+++ b/docs/en_US/server_dialog.rst
@@ -1,12 +1,12 @@
 .. _server_dialog:
 
 *****************
-The Server Dialog 
+The Server Dialog
 *****************
 
-Use the *Server* dialog to describe a connection to a server. Note: you must ensure the pg_hba.conf file of the server from which you are connecting allows connections from the host of the client. 
+Use the *Server* dialog to describe a connection to a server. Note: you must ensure the pg_hba.conf file of the server from which you are connecting allows connections from the host of the client.
 
-The *Server* dialog organizes the connection of a server through the following dialog tabs: *General*, and *Connection*. 
+The *Server* dialog organizes the connection of a server through the following dialog tabs: *General*, and *Connection*.
 
 .. image:: images/server_general.png
 
@@ -25,19 +25,12 @@ Use the fields in the *Connection* tab to configure a connection:
 
 * Specify the IP address of the server host, or the fully qualified domain name in the *Host name/address* field. On Unix based systems, the address field may be left blank to use the default PostgreSQL Unix Domain Socket on the local machine, or may be set to an alternate path containing a PostgreSQL socket. If you enter a path, the path must begin with a "/".
 * Enter the listener port number of the server host in the *Port* field. The default is *5432*.
-* Use the *Maintenance database* field to specify the name of the initial database to which the client will connect.  If you will be using pgAgent or adminpack objects, the pgAgent schema and adminpack objects should be installed on that database. 
-* Use the *User name* field to specify the name of a role that will be used when authenticating with the server. 
-* Use the *Password* field to provide a password that will be supplied when authenticating with the server. 
-* Check the box next to *Save password* to instruct pgAdmin to save the password for future use. 
+* Use the *Maintenance database* field to specify the name of the initial database to which the client will connect.  If you will be using pgAgent or adminpack objects, the pgAgent schema and adminpack objects should be installed on that database.
+* Use the *User name* field to specify the name of a role that will be used when authenticating with the server.
+* Use the *Password* field to provide a password that will be supplied when authenticating with the server.
+* Check the box next to *Save password* to instruct pgAdmin to save the password for future use.
 * Use the *Role* field to specify the name of a role that has privileges that will be conveyed to the client after authentication with the server. This selection allows you to connect as one role, and then assume the permissions of this specified role after the connection is established. Note that the connecting role must be a member of the role specified.
-* Use the drop-down list box in the SSL field to select the type of SSL connection the server should use. For more information about using SSL encryption, see Section 31.18 of the Postgres documentation:
-   
-   http://www.postgresql.org/docs/9.5/static/libpq-ssl.html  
 
-* Click the *Save* button to save work.
-* Click the *Cancel* button to exit without saving work.
-* Click the *Reset* button to restore configuration parameters.
-  
 Click the *Advanced* tab to continue.
 
 .. image:: images/server_advanced.png
@@ -45,4 +38,29 @@ Click the *Advanced* tab to continue.
 Use the fields in the *Advanced* tab to configure a connection:
 
 * Specify the IP address of the server host. Using this field to specify the host IP address will avoid a DNS lookup on connection, however it may be useful to specify both a host name and address when using Kerberos, GSSAPI, or SSPI authentication methods, as well as for verify-full SSL certificate verification
-* The DB restriction field allows you to enter an SQL restriction that will be used against the pg_database table to limit the databases that you see. For example, you might enter: *live_db test_db* so that only live_db and test_db are shown in the pgAdmin browser. Separate entries with a comma or tab as you type.
\ No newline at end of file
+* The DB restriction field allows you to enter an SQL restriction that will be used against the pg_database table to limit the databases that you see. For example, you might enter: *live_db test_db* so that only live_db and test_db are shown in the pgAdmin browser. Separate entries with a comma or tab as you type.
+* Specify the password file which allow user to login without providing password, see Section 31 of the Postgres documentation:
+
+   https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html
+
+Click the *SSL* tab to continue.
+
+.. image:: images/server_ssl.png
+
+Use the fields in the *SSL* tab to configure a SSL:
+
+* Use the drop-down list box in the SSL field to select the type of SSL connection the server should use. For more information about using SSL encryption, see Section 31.18 of the Postgres documentation:
+
+   http://www.postgresql.org/docs/9.5/static/libpq-ssl.html
+
+* Specify the file containing the name of the client SSL certificate, replacing the default *~/.postgresql/postgresql.crt*. This parameter is ignored if an SSL connection is not made.
+* Specify the file containing the secret key used for the client certificate, replacing the default *~/.postgresql/postgresql.key*. This parameter is ignored if an SSL connection is not made.
+* Specify the file containing the SSL certificate authority, replacing the default *~/.postgresql/root.crt*. This parameter is ignored if an SSL connection is not made.
+* Specify the file containing the SSL certificate revocation list, replacing the default *~/.postgresql/root.crl*. This parameter is ignored if an SSL connection is not made.
+* If set to True, data sent over SSL connections will be compressed else compression will be disabled, The default is *False*. This parameter is ignored if an SSL connection is not made, see Section 32.1.2 of the Postgres documentation for more details:
+
+   https://www.postgresql.org/docs/9.6/static/libpq-connect.html
+
+* Click the *Save* button to save work.
+* Click the *Cancel* button to exit without saving work.
+* Click the *Reset* button to restore configuration parameters.
diff --git a/web/migrations/versions/ef590e979b0d_.py b/web/migrations/versions/ef590e979b0d_.py
new file mode 100644
index 0000000..be219c5
--- /dev/null
+++ b/web/migrations/versions/ef590e979b0d_.py
@@ -0,0 +1,46 @@
+
+"""empty message
+
+Revision ID: ef590e979b0d
+Revises: d85a62333272
+Create Date: 2017-08-23 18:37:14.836988
+
+"""
+from alembic import op
+import sqlalchemy as sa
+from pgadmin.model import db
+
+# revision identifiers, used by Alembic.
+revision = 'ef590e979b0d'
+down_revision = 'd85a62333272'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+    db.engine.execute(
+        'ALTER TABLE server ADD COLUMN passfile TEXT'
+    )
+    db.engine.execute(
+        'ALTER TABLE server ADD COLUMN sslcert TEXT'
+    )
+    db.engine.execute(
+        'ALTER TABLE server ADD COLUMN sslkey TEXT'
+    )
+    db.engine.execute(
+        'ALTER TABLE server ADD COLUMN sslrootcert TEXT'
+    )
+    db.engine.execute(
+        'ALTER TABLE server ADD COLUMN sslcrl TEXT'
+    )
+    db.engine.execute(
+        'ALTER TABLE server ADD COLUMN sslcompression '
+        'INTEGER default 0'
+    )
+    db.engine.execute(
+        'UPDATE server SET sslcompression=0'
+    )
+
+
+def downgrade():
+    pass
diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py b/web/pgadmin/browser/server_groups/servers/__init__.py
index a74436e..817de08 100644
--- a/web/pgadmin/browser/server_groups/servers/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/__init__.py
@@ -230,7 +230,29 @@ class ServerNode(PGChildNodeView):
            '((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$'
     pat4 = re.compile(EXP_IP4)
     pat6 = re.compile(EXP_IP6)
+    SSL_MODES = ['prefer','require', 'verify-ca', 'verify-full']
 
+    def check_ssl_fields(self, data):
+        """
+        This function will allow us to check and set defaults for
+        SSL fields
+
+        Args:
+            data: Response data
+
+        Returns:
+            Flag and Data
+        """
+        flag = False
+        if 'sslmode' in data and data['sslmode'] in self.SSL_MODES:
+            flag = True
+            ssl_fields = [
+                'sslcert', 'sslkey', 'sslrootcert', 'sslcrl', 'sslcompression'
+            ]
+            for field in ssl_fields:
+                if field not in data:
+                    data[field] = None
+        return flag, data
 
     def nodes(self, gid):
         res = []
@@ -381,7 +403,13 @@ class ServerNode(PGChildNodeView):
             'gid': 'servergroup_id',
             'comment': 'comment',
             'role': 'role',
-            'db_res': 'db_res'
+            'db_res': 'db_res',
+            'passfile': 'passfile',
+            'sslcert': 'sslcert',
+            'sslkey': 'sslkey',
+            'sslrootcert': 'sslrootcert',
+            'sslcrl': 'sslcrl',
+            'sslcompression': 'sslcompression'
         }
 
         disp_lbl = {
@@ -411,8 +439,6 @@ class ServerNode(PGChildNodeView):
                     errormsg=gettext('Host address not valid')
                     )
 
-
-
         manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(sid)
         conn = manager.connection()
         connected = conn.connected()
@@ -430,7 +456,12 @@ class ServerNode(PGChildNodeView):
 
         for arg in config_param_map:
             if arg in data:
-                setattr(server, config_param_map[arg], data[arg])
+                value = data[arg]
+                # sqlite3 do not have boolean type so we need to convert
+                # it manually to integer
+                if arg == 'sslcompression':
+                    value = 1 if value else 0
+                setattr(server, config_param_map[arg], value)
                 idx += 1
 
         if idx == 0:
@@ -532,6 +563,8 @@ class ServerNode(PGChildNodeView):
         conn = manager.connection()
         connected = conn.connected()
 
+        is_ssl = True if server.ssl_mode in self.SSL_MODES else False
+
         return ajax_response(
             response={
                 'id': server.id,
@@ -549,7 +582,14 @@ class ServerNode(PGChildNodeView):
                 'version': manager.ver,
                 'sslmode': server.ssl_mode,
                 'server_type': manager.server_type if connected else 'pg',
-                'db_res': server.db_res.split(',') if server.db_res else None
+                'db_res': server.db_res.split(',') if server.db_res else None,
+                'passfile': server.passfile if server.passfile else None,
+                'sslcert': server.sslcert if is_ssl else None,
+                'sslkey': server.sslkey if is_ssl else None,
+                'sslrootcert': server.sslrootcert if is_ssl else None,
+                'sslcrl': server.sslcrl if is_ssl else None,
+                'sslcompression': True if is_ssl and server.sslcompression
+                else False
             }
         )
 
@@ -588,6 +628,9 @@ class ServerNode(PGChildNodeView):
                         errormsg=gettext('Host address not valid')
                     )
 
+        # To check ssl configuration
+        is_ssl, data = self.check_ssl_fields(data)
+
         server = None
 
         try:
@@ -603,7 +646,12 @@ class ServerNode(PGChildNodeView):
                 ssl_mode=data[u'sslmode'],
                 comment=data[u'comment'] if u'comment' in data else None,
                 role=data[u'role'] if u'role' in data else None,
-                db_res=','.join(data[u'db_res']) if u'db_res' in data else None
+                db_res=','.join(data[u'db_res']) if u'db_res' in data else None,
+                sslcert=data['sslcert'] if is_ssl else None,
+                sslkey=data['sslkey'] if is_ssl else None,
+                sslrootcert=data['sslrootcert'] if is_ssl else None,
+                sslcrl=data['sslcrl'] if is_ssl else None,
+                sslcompression=1 if is_ssl and data['sslcompression'] else 0
             )
             db.session.add(server)
             db.session.commit()
@@ -621,14 +669,21 @@ class ServerNode(PGChildNodeView):
                 if 'password' in data and data["password"] != '':
                     # login with password
                     have_password = True
+                    passfile = None
                     password = data['password']
                     password = encrypt(password, current_user.password)
+                elif 'passfile' in data and data["passfile"] != '':
+                    passfile = data['passfile']
+                    setattr(server, 'passfile', passfile)
+                    db.session.commit()
                 else:
                     # Attempt password less login
                     password = None
+                    passfile = None
 
                 status, errmsg = conn.connect(
                     password=password,
+                    passfile=passfile,
                     server_types=ServerType.types()
                 )
                 if hasattr(str, 'decode') and errmsg is not None:
@@ -774,6 +829,7 @@ class ServerNode(PGChildNodeView):
         ) if request.data else {}
 
         password = None
+        passfile = None
         save_password = False
 
         # Connect the Server
@@ -782,7 +838,8 @@ class ServerNode(PGChildNodeView):
 
         if 'password' not in data:
             conn_passwd = getattr(conn, 'password', None)
-            if conn_passwd is None and server.password is None:
+            if conn_passwd is None and server.password is None and \
+                    server.passfile is None:
                 # Return the password template in case password is not
                 # provided, or password has not been saved earlier.
                 return make_json_response(
@@ -795,6 +852,8 @@ class ServerNode(PGChildNodeView):
                         _=gettext
                     )
                 )
+            elif server.passfile and server.passfile != '':
+                passfile = server.passfile
             else:
                 password = conn_passwd or server.password
         else:
@@ -815,6 +874,7 @@ class ServerNode(PGChildNodeView):
         try:
             status, errmsg = conn.connect(
                 password=password,
+                passfile=passfile,
                 server_types=ServerType.types()
             )
         except Exception as e:
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js b/web/pgadmin/browser/server_groups/servers/static/js/server.js
index ea25ab8..54adf12 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/server.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js
@@ -10,6 +10,7 @@ define('pgadmin.node.server', [
 ) {
 
   if (!pgBrowser.Nodes['server']) {
+    var SSL_MODES = ['prefer', 'require', 'verify-ca', 'verify-full'];
 
     var SecurityModel = pgBrowser.SecLabelModel = pgBrowser.Node.Model.extend({
       defaults: {
@@ -611,7 +612,13 @@ define('pgadmin.node.server', [
           connect_now: true,
           password: undefined,
           save_password: false,
-          db_res: ''
+          db_res: '',
+          passfile: undefined,
+          sslcompression: false,
+          sslcert: undefined,
+          sslkey: undefined,
+          sslrootcert: undefined,
+          sslcrl: undefined
         },
         // Default values!
         initialize: function(attrs, args) {
@@ -688,7 +695,7 @@ define('pgadmin.node.server', [
           id: 'role', label: gettext('Role'), type: 'text', group: gettext('Connection'),
           mode: ['properties', 'edit', 'create'], disabled: 'isConnected'
         },{
-          id: 'sslmode', label: gettext('SSL mode'), type: 'options', group: gettext('Connection'),
+          id: 'sslmode', label: gettext('SSL mode'), type: 'options', group: gettext('SSL'),
           mode: ['properties', 'edit', 'create'], disabled: 'isConnected',
           'options': [
             {label: 'Allow', value: 'allow'},
@@ -698,6 +705,89 @@ define('pgadmin.node.server', [
             {label: 'Verify-CA', value: 'verify-ca'},
             {label: 'Verify-Full', value: 'verify-full'}
           ]
+        },{
+          id: 'passfile', label: gettext('Password File'), type: 'text',
+          group: gettext('Advanced'), mode: ['edit', 'create'],
+          disabled: 'isConnected', control: Backform.FileControl,
+          dialog_type: 'select_file', supp_types: ['*']
+        },{
+          id: 'sslcert', label: gettext('Client certificate'), type: 'text',
+          group: gettext('SSL'), mode: ['edit', 'create'],
+          disabled: 'isSSL', control: Backform.FileControl,
+          dialog_type: 'select_file', supp_types: ['*'],
+          deps: ['sslmode']
+        },{
+          id: 'sslkey', label: gettext('Client certificate key'), type: 'text',
+          group: gettext('SSL'), mode: ['edit', 'create'],
+          disabled: 'isSSL', control: Backform.FileControl,
+          dialog_type: 'select_file', supp_types: ['*'],
+          deps: ['sslmode']
+        },{
+          id: 'sslrootcert', label: gettext('Root certificate'), type: 'text',
+          group: gettext('SSL'), mode: ['edit', 'create'],
+          disabled: 'isSSL', control: Backform.FileControl,
+          dialog_type: 'select_file', supp_types: ['*'],
+          deps: ['sslmode']
+        },{
+          id: 'sslcrl', label: gettext('Certificate revocation list'), type: 'text',
+          group: gettext('SSL'), mode: ['edit', 'create'],
+          disabled: 'isSSL', control: Backform.FileControl,
+          dialog_type: 'select_file', supp_types: ['*'],
+          deps: ['sslmode']
+        },{
+          id: 'sslcompression', label: gettext('SSL compression?'), type: 'switch',
+          mode: ['edit', 'create'], group: gettext('SSL'),
+          'options': { 'onText':   'True', 'offText':  'False',
+          'onColor':  'success', 'offColor': 'danger', 'size': 'small'},
+          deps: ['sslmode'], disabled: 'isSSL'
+        },{
+          id: 'sslcompression', label: gettext('SSL compression?'), type: 'switch',
+          mode: ['properties'], group: gettext('SSL'),
+          'options': { 'onText':   'True', 'offText':  'False',
+          'onColor':  'success', 'offColor': 'danger', 'size': 'small'},
+          deps: ['sslmode'], visible: function(m) {
+            var sslmode = m.get('sslmode');
+            return _.indexOf(SSL_MODES, sslmode) != -1;
+          }
+        },{
+          id: 'passfile', label: gettext('Password File'), type: 'text',
+          group: gettext('Advanced'), mode: ['properties'],
+          visible: function(m) {
+            var passfile = m.get('passfile');
+            return !_.isUndefined(passfile) && !_.isNull(passfile);
+          }
+        },{
+          id: 'sslcert', label: gettext('Client certificate'), type: 'text',
+          group: gettext('SSL'), mode: ['properties'],
+          deps: ['sslmode'],
+          visible: function(m) {
+            var sslcert = m.get('sslcert');
+            return !_.isUndefined(sslcert) && !_.isNull(sslcert);
+          }
+        },{
+          id: 'sslkey', label: gettext('Client certificate key'), type: 'text',
+          group: gettext('SSL'), mode: ['properties'],
+          deps: ['sslmode'],
+          visible: function(m) {
+            var sslkey = m.get('sslkey');
+            return !_.isUndefined(sslkey) && !_.isNull(sslkey);
+          }
+        },{
+          id: 'sslrootcert', label: gettext('Root certificate'), type: 'text',
+          group: gettext('SSL'), mode: ['properties'],
+          deps: ['sslmode'],
+          visible: function(m) {
+            var sslrootcert = m.get('sslrootcert');
+            return !_.isUndefined(sslrootcert) && !_.isNull(sslrootcert);
+          }
+        },{
+          id: 'sslcrl', label: gettext('Certificate revocation list'), type: 'text',
+          group: gettext('SSL'), mode: ['properties'],
+          deps: ['sslmode'],
+          visible: function(m) {
+            var sslcrl = m.get('sslcrl');
+            return !_.isUndefined(sslcrl) && !_.isNull(sslcrl);
+          }
         }],
         validate: function() {
           var err = {},
@@ -790,6 +880,14 @@ define('pgadmin.node.server', [
         },
         isConnected: function(model) {
           return model.get('connected');
+        },
+        isSSL: function(model) {
+          var ssl_mode = model.get('sslmode');
+          // If server is not connected and have required SSL option
+          if(model.get('connected')) {
+            return true;
+          }
+          return _.indexOf(SSL_MODES, ssl_mode) == -1;
         }
       }),
       connection_lost: function(i, resp) {
diff --git a/web/pgadmin/misc/file_manager/__init__.py b/web/pgadmin/misc/file_manager/__init__.py
index 843ec61..fac8cac 100644
--- a/web/pgadmin/misc/file_manager/__init__.py
+++ b/web/pgadmin/misc/file_manager/__init__.py
@@ -182,6 +182,14 @@ class FileManagerModule(PgAdminModule):
                      {'label': gettext('Grid'), 'value': 'grid'}]
         )
 
+        self.show_hidden_files = self.preference.register(
+            'options', 'show_hidden_files',
+            gettext("Show hidden files?"), 'boolean', False,
+            category_label=gettext('Options'),
+            help_str=gettext('Specifies whether or not to show hidden files '
+                             'in file manager.')
+        )
+
 
 # Initialise the module
 blueprint = FileManagerModule(MODULE_NAME, __name__)
@@ -527,6 +535,9 @@ class Filemanager(object):
         directory.
         """
         Filemanager.suspend_windows_warning()
+        pref = Preferences.module('file_manager')
+        is_show_hidden_files = pref.preference('show_hidden_files').get()
+
         path = unquote(path)
         if hasattr(str, 'decode'):
             path = unquote(path).encode('utf-8').decode('utf-8')
@@ -595,8 +606,9 @@ class Filemanager(object):
                 protected = 0
                 system_path = os.path.join(os.path.join(orig_path, f))
 
-                # continue if file/folder is hidden
-                if is_folder_hidden(system_path) or f.startswith('.'):
+                # continue if file/folder is hidden (based on user preference)
+                if not is_show_hidden_files and \
+                    (is_folder_hidden(system_path) or f.startswith('.')):
                     continue
 
                 user_path = os.path.join(os.path.join(user_dir, f))
diff --git a/web/pgadmin/model/__init__.py b/web/pgadmin/model/__init__.py
index e1e1d4a..eb9dab3 100644
--- a/web/pgadmin/model/__init__.py
+++ b/web/pgadmin/model/__init__.py
@@ -129,8 +129,15 @@ class Server(db.Model):
                            backref=db.backref('server', cascade="all, delete-orphan"),
                            lazy='joined')
     db_res = db.Column(db.Text(), nullable=True)
-
-
+    passfile = db.Column(db.Text(), nullable=True)
+    sslcert = db.Column(db.Text(), nullable=True)
+    sslkey = db.Column(db.Text(), nullable=True)
+    sslrootcert = db.Column(db.Text(), nullable=True)
+    sslcrl = db.Column(db.Text(), nullable=True)
+    sslcompression =db.Column(db.Integer(),
+                              db.CheckConstraint(
+                                  'sslcompression >= 0 AND sslcompression <= 1'
+                              ), nullable=False)
 
 
 class ModulePreference(db.Model):
@@ -220,4 +227,4 @@ class Keys(db.Model):
     """Define the keys table."""
     __tablename__ = 'keys'
     name = db.Column(db.String(), nullable=False, primary_key=True)
-    value = db.Column(db.String(), nullable=False)
\ No newline at end of file
+    value = db.Column(db.String(), nullable=False)
diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py
index 7cda5ef..a2826a1 100644
--- a/web/pgadmin/utils/driver/psycopg2/__init__.py
+++ b/web/pgadmin/utils/driver/psycopg2/__init__.py
@@ -295,9 +295,11 @@ class Connection(BaseConnection):
 
         pg_conn = None
         password = None
+        passfile = None
         mgr = self.manager
 
         encpass = kwargs['password'] if 'password' in kwargs else None
+        passfile = kwargs['passfile'] if 'passfile' in kwargs else None
 
         if encpass is None:
             encpass = self.password or getattr(mgr, 'password', None)
@@ -350,7 +352,13 @@ class Connection(BaseConnection):
                 user=user,
                 password=password,
                 async=self.async,
-                sslmode=mgr.ssl_mode
+                passfile=passfile,
+                sslmode=mgr.ssl_mode,
+                sslcert=mgr.sslcert,
+                sslkey=mgr.sslkey,
+                sslrootcert=mgr.sslrootcert,
+                sslcrl=mgr.sslcrl,
+                sslcompression=True if mgr.sslcompression else False
             )
 
             # If connection is asynchronous then we will have to wait
@@ -1192,7 +1200,14 @@ Failed to execute query (execute_void) for the server #{server_id} - {conn_id}
                 port=mgr.port,
                 database=self.db,
                 user=mgr.user,
-                password=password
+                password=password,
+                passfile=mgr.passfile,
+                sslmode=mgr.ssl_mode,
+                sslcert=mgr.sslcert,
+                sslkey=mgr.sslkey,
+                sslrootcert=mgr.sslrootcert,
+                sslcrl=mgr.sslcrl,
+                sslcompression=True if mgr.sslcompression else False
             )
 
         except psycopg2.Error as e:
@@ -1461,7 +1476,15 @@ Failed to reset the connection to the server due to following error:
                     port=self.manager.port,
                     database=self.db,
                     user=self.manager.user,
-                    password=password
+                    password=password,
+                    passfile=self.manager.passfile,
+                    sslmode=self.manager.ssl_mode,
+                    sslcert=self.manager.sslcert,
+                    sslkey=self.manager.sslkey,
+                    sslrootcert=self.manager.sslrootcert,
+                    sslcrl=self.manager.sslcrl,
+                    sslcompression=True if self.manager.sslcompression
+                    else False
                 )
 
                 # Get the cursor and run the query
@@ -1616,6 +1639,12 @@ class ServerManager(object):
         self.db_info = dict()
         self.server_types = None
         self.db_res = server.db_res
+        self.passfile = server.passfile
+        self.sslcert = server.sslcert
+        self.sslkey = server.sslkey
+        self.sslrootcert = server.sslrootcert
+        self.sslcrl = server.sslcrl
+        self.sslcompression = True if server.sslcompression else False
 
         for con in self.connections:
             self.connections[con]._release()
