Better handling of cert errors on connection.