Optionally verify SSL connection to IRC servers
authorShane Synan <digitalcircuit36939@gmail.com>
Wed, 13 Jul 2016 23:17:30 +0000 (19:17 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 5 Sep 2016 20:31:24 +0000 (22:31 +0200)
Add SSL verify flag.
> In database, add 'sslverify' to 'server' table, defaulting to
false so upgrades won't break existing setups.  This modifies
schema, requiring a version bump, changes to migration scripts, etc.
> In protocol, add 'sslVerify' to Network::Server, configuring if
SSL errors should be ignored or result in disconnect.

Add 'VerifyServerSSL' feature flag so the client can tell users about
needing to upgrade their core to get this feature.

If SSL verification fails and...
> SSL verify enabled:  disconnect and trigger a retry, logging the
error message in the status buffer
> SSL verify disabled: log the error message at Info level and
continue connecting anyways

Add "Verify connection security" checkbox to network add/edit dialogs
with an explanatory tooltip.  Tooltip is modified and checkbox
disabled if the core does not support the feature.  Connections are
verified by default when "Use encrypted connection" is checked.

Change "Use SSL" and "Use secure connection" to
"Use encrypted connection" to better reflect what the option does.

Fix tooltips and other strings in network editing dialogs.

Testing:
> Database schema handling
SQLite new install - works
SQLite upgrade - works
SQLite migrate to Postgres - works
Postgres new install - works
Postgres upgrade - works

> Client/core connections
New client, new core - works
New client, old core - works, verify SSL grayed out
Old client, new core - works, verify SSL reset to false on edit
(Unfortunately there's no way to use a boolean and tell if the client
 is old, or actually setting verify SSL to false.  Would need the
 work-in-progress ClientFeature system 'esainane' designed)

(Not using '@mention' since that notifies on EVERY commit push)

184 files changed:
src/common/network.cpp
src/common/network.h
src/common/presetnetworks.cpp
src/common/quassel.h
src/core/SQL/PostgreSQL/18/delete_backlog_by_uid.sql [moved from src/core/SQL/PostgreSQL/17/delete_backlog_by_uid.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_backlog_for_buffer.sql [moved from src/core/SQL/PostgreSQL/17/delete_backlog_for_buffer.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_backlog_for_network.sql [moved from src/core/SQL/PostgreSQL/17/delete_backlog_for_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_buffer_for_bufferid.sql [moved from src/core/SQL/PostgreSQL/17/delete_buffer_for_bufferid.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_buffers_by_uid.sql [moved from src/core/SQL/PostgreSQL/17/delete_buffers_by_uid.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_buffers_for_network.sql [moved from src/core/SQL/PostgreSQL/17/delete_buffers_for_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_identity.sql [moved from src/core/SQL/PostgreSQL/17/delete_identity.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_ircservers_for_network.sql [moved from src/core/SQL/PostgreSQL/17/delete_ircservers_for_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_network.sql [moved from src/core/SQL/PostgreSQL/17/delete_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_networks_by_uid.sql [moved from src/core/SQL/PostgreSQL/17/delete_networks_by_uid.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_nicks.sql [moved from src/core/SQL/PostgreSQL/17/delete_nicks.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/delete_quasseluser.sql [moved from src/core/SQL/PostgreSQL/17/delete_quasseluser.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/insert_buffer.sql [moved from src/core/SQL/PostgreSQL/17/insert_buffer.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/insert_identity.sql [moved from src/core/SQL/PostgreSQL/17/insert_identity.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/insert_message.sql [moved from src/core/SQL/PostgreSQL/17/insert_message.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/insert_network.sql [moved from src/core/SQL/PostgreSQL/17/insert_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/insert_nick.sql [moved from src/core/SQL/PostgreSQL/17/insert_nick.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/insert_quasseluser.sql [moved from src/core/SQL/PostgreSQL/17/insert_quasseluser.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/insert_sender.sql [moved from src/core/SQL/PostgreSQL/17/insert_sender.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/insert_server.sql [moved from src/core/SQL/PostgreSQL/17/insert_server.sql with 79% similarity]
src/core/SQL/PostgreSQL/18/insert_user_setting.sql [moved from src/core/SQL/PostgreSQL/17/insert_user_setting.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_backlog.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_backlog.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_buffer.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_buffer.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_identity.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_identity.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_identity_nick.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_identity_nick.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_ircserver.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_ircserver.sql with 57% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_network.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_quasseluser.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_quasseluser.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_sender.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_sender.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/migrate_write_usersetting.sql [moved from src/core/SQL/PostgreSQL/17/migrate_write_usersetting.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_authuser.sql [moved from src/core/SQL/PostgreSQL/17/select_authuser.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_bufferByName.sql [moved from src/core/SQL/PostgreSQL/17/select_bufferByName.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_bufferExists.sql [moved from src/core/SQL/PostgreSQL/17/select_bufferExists.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_buffer_by_id.sql [moved from src/core/SQL/PostgreSQL/17/select_buffer_by_id.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_buffer_lastseen_messages.sql [moved from src/core/SQL/PostgreSQL/17/select_buffer_lastseen_messages.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_buffer_markerlinemsgids.sql [moved from src/core/SQL/PostgreSQL/17/select_buffer_markerlinemsgids.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_buffers.sql [moved from src/core/SQL/PostgreSQL/17/select_buffers.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_buffers_for_network.sql [moved from src/core/SQL/PostgreSQL/17/select_buffers_for_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_checkidentity.sql [moved from src/core/SQL/PostgreSQL/17/select_checkidentity.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_connected_networks.sql [moved from src/core/SQL/PostgreSQL/17/select_connected_networks.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_identities.sql [moved from src/core/SQL/PostgreSQL/17/select_identities.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_internaluser.sql [moved from src/core/SQL/PostgreSQL/17/select_internaluser.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_messages.sql [moved from src/core/SQL/PostgreSQL/17/select_messages.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_messagesAll.sql [moved from src/core/SQL/PostgreSQL/17/select_messagesAll.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_messagesAllNew.sql [moved from src/core/SQL/PostgreSQL/17/select_messagesAllNew.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_messagesNewerThan.sql [moved from src/core/SQL/PostgreSQL/17/select_messagesNewerThan.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_messagesRange.sql [moved from src/core/SQL/PostgreSQL/17/select_messagesRange.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_networkExists.sql [moved from src/core/SQL/PostgreSQL/17/select_networkExists.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_network_awaymsg.sql [moved from src/core/SQL/PostgreSQL/17/select_network_awaymsg.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_network_usermode.sql [moved from src/core/SQL/PostgreSQL/17/select_network_usermode.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_networks_for_user.sql [moved from src/core/SQL/PostgreSQL/17/select_networks_for_user.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_nicks.sql [moved from src/core/SQL/PostgreSQL/17/select_nicks.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_persistent_channels.sql [moved from src/core/SQL/PostgreSQL/17/select_persistent_channels.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_senderid.sql [moved from src/core/SQL/PostgreSQL/17/select_senderid.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_servers_for_network.sql [moved from src/core/SQL/PostgreSQL/17/select_servers_for_network.sql with 63% similarity]
src/core/SQL/PostgreSQL/18/select_user_setting.sql [moved from src/core/SQL/PostgreSQL/17/select_user_setting.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/select_userid.sql [moved from src/core/SQL/PostgreSQL/17/select_userid.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_000_quasseluser.sql [moved from src/core/SQL/PostgreSQL/17/setup_000_quasseluser.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_010_sender.sql [moved from src/core/SQL/PostgreSQL/17/setup_010_sender.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_020_identity.sql [moved from src/core/SQL/PostgreSQL/17/setup_020_identity.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_030_identity_nick.sql [moved from src/core/SQL/PostgreSQL/17/setup_030_identity_nick.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_040_network.sql [moved from src/core/SQL/PostgreSQL/17/setup_040_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_050_buffer.sql [moved from src/core/SQL/PostgreSQL/17/setup_050_buffer.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_060_backlog.sql [moved from src/core/SQL/PostgreSQL/17/setup_060_backlog.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_070_coreinfo.sql [moved from src/core/SQL/PostgreSQL/17/setup_070_coreinfo.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_080_ircservers.sql [moved from src/core/SQL/PostgreSQL/17/setup_080_ircservers.sql with 86% similarity]
src/core/SQL/PostgreSQL/18/setup_090_backlog_idx.sql [moved from src/core/SQL/PostgreSQL/17/setup_090_backlog_idx.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_100_user_setting.sql [moved from src/core/SQL/PostgreSQL/17/setup_100_user_setting.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_110_alter_sender_seq.sql [moved from src/core/SQL/PostgreSQL/17/setup_110_alter_sender_seq.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/setup_120_alter_messageid_seq.sql [moved from src/core/SQL/PostgreSQL/17/setup_120_alter_messageid_seq.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_backlog_bufferid.sql [moved from src/core/SQL/PostgreSQL/17/update_backlog_bufferid.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_buffer_lastseen.sql [moved from src/core/SQL/PostgreSQL/17/update_buffer_lastseen.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_buffer_markerlinemsgid.sql [moved from src/core/SQL/PostgreSQL/17/update_buffer_markerlinemsgid.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_buffer_name.sql [moved from src/core/SQL/PostgreSQL/17/update_buffer_name.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_buffer_persistent_channel.sql [moved from src/core/SQL/PostgreSQL/17/update_buffer_persistent_channel.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_buffer_set_channel_key.sql [moved from src/core/SQL/PostgreSQL/17/update_buffer_set_channel_key.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_identity.sql [moved from src/core/SQL/PostgreSQL/17/update_identity.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_network.sql [moved from src/core/SQL/PostgreSQL/17/update_network.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_network_connected.sql [moved from src/core/SQL/PostgreSQL/17/update_network_connected.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_network_set_awaymsg.sql [moved from src/core/SQL/PostgreSQL/17/update_network_set_awaymsg.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_network_set_usermode.sql [moved from src/core/SQL/PostgreSQL/17/update_network_set_usermode.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_user_setting.sql [moved from src/core/SQL/PostgreSQL/17/update_user_setting.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_username.sql [moved from src/core/SQL/PostgreSQL/17/update_username.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/update_userpassword.sql [moved from src/core/SQL/PostgreSQL/17/update_userpassword.sql with 100% similarity]
src/core/SQL/PostgreSQL/18/upgrade_000_alter_ircserver_add_sslverify.sql [new file with mode: 0644]
src/core/SQL/SQLite/19/delete_backlog_by_uid.sql [moved from src/core/SQL/SQLite/18/delete_backlog_by_uid.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_backlog_for_buffer.sql [moved from src/core/SQL/SQLite/18/delete_backlog_for_buffer.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_backlog_for_network.sql [moved from src/core/SQL/SQLite/18/delete_backlog_for_network.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_buffer_for_bufferid.sql [moved from src/core/SQL/SQLite/18/delete_buffer_for_bufferid.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_buffers_by_uid.sql [moved from src/core/SQL/SQLite/18/delete_buffers_by_uid.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_buffers_for_network.sql [moved from src/core/SQL/SQLite/18/delete_buffers_for_network.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_identity.sql [moved from src/core/SQL/SQLite/18/delete_identity.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_ircservers_for_network.sql [moved from src/core/SQL/SQLite/18/delete_ircservers_for_network.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_network.sql [moved from src/core/SQL/SQLite/18/delete_network.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_networks_by_uid.sql [moved from src/core/SQL/SQLite/18/delete_networks_by_uid.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_nicks.sql [moved from src/core/SQL/SQLite/18/delete_nicks.sql with 100% similarity]
src/core/SQL/SQLite/19/delete_quasseluser.sql [moved from src/core/SQL/SQLite/18/delete_quasseluser.sql with 100% similarity]
src/core/SQL/SQLite/19/insert_buffer.sql [moved from src/core/SQL/SQLite/18/insert_buffer.sql with 100% similarity]
src/core/SQL/SQLite/19/insert_identity.sql [moved from src/core/SQL/SQLite/18/insert_identity.sql with 100% similarity]
src/core/SQL/SQLite/19/insert_message.sql [moved from src/core/SQL/SQLite/18/insert_message.sql with 100% similarity]
src/core/SQL/SQLite/19/insert_network.sql [moved from src/core/SQL/SQLite/18/insert_network.sql with 100% similarity]
src/core/SQL/SQLite/19/insert_nick.sql [moved from src/core/SQL/SQLite/18/insert_nick.sql with 100% similarity]
src/core/SQL/SQLite/19/insert_quasseluser.sql [moved from src/core/SQL/SQLite/18/insert_quasseluser.sql with 100% similarity]
src/core/SQL/SQLite/19/insert_sender.sql [moved from src/core/SQL/SQLite/18/insert_sender.sql with 100% similarity]
src/core/SQL/SQLite/19/insert_server.sql [moved from src/core/SQL/SQLite/18/insert_server.sql with 79% similarity]
src/core/SQL/SQLite/19/insert_user_setting.sql [moved from src/core/SQL/SQLite/18/insert_user_setting.sql with 100% similarity]
src/core/SQL/SQLite/19/migrate_read_backlog.sql [moved from src/core/SQL/SQLite/18/migrate_read_backlog.sql with 100% similarity]
src/core/SQL/SQLite/19/migrate_read_buffer.sql [moved from src/core/SQL/SQLite/18/migrate_read_buffer.sql with 100% similarity]
src/core/SQL/SQLite/19/migrate_read_identity.sql [moved from src/core/SQL/SQLite/18/migrate_read_identity.sql with 100% similarity]
src/core/SQL/SQLite/19/migrate_read_identity_nick.sql [moved from src/core/SQL/SQLite/18/migrate_read_identity_nick.sql with 100% similarity]
src/core/SQL/SQLite/19/migrate_read_ircserver.sql [moved from src/core/SQL/SQLite/18/migrate_read_ircserver.sql with 84% similarity]
src/core/SQL/SQLite/19/migrate_read_network.sql [moved from src/core/SQL/SQLite/18/migrate_read_network.sql with 100% similarity]
src/core/SQL/SQLite/19/migrate_read_quasseluser.sql [moved from src/core/SQL/SQLite/18/migrate_read_quasseluser.sql with 100% similarity]
src/core/SQL/SQLite/19/migrate_read_sender.sql [moved from src/core/SQL/SQLite/18/migrate_read_sender.sql with 100% similarity]
src/core/SQL/SQLite/19/migrate_read_usersetting.sql [moved from src/core/SQL/SQLite/18/migrate_read_usersetting.sql with 100% similarity]
src/core/SQL/SQLite/19/select_authuser.sql [moved from src/core/SQL/SQLite/18/select_authuser.sql with 100% similarity]
src/core/SQL/SQLite/19/select_bufferByName.sql [moved from src/core/SQL/SQLite/18/select_bufferByName.sql with 100% similarity]
src/core/SQL/SQLite/19/select_bufferExists.sql [moved from src/core/SQL/SQLite/18/select_bufferExists.sql with 100% similarity]
src/core/SQL/SQLite/19/select_buffer_by_id.sql [moved from src/core/SQL/SQLite/18/select_buffer_by_id.sql with 100% similarity]
src/core/SQL/SQLite/19/select_buffer_lastseen_messages.sql [moved from src/core/SQL/SQLite/18/select_buffer_lastseen_messages.sql with 100% similarity]
src/core/SQL/SQLite/19/select_buffer_markerlinemsgids.sql [moved from src/core/SQL/SQLite/18/select_buffer_markerlinemsgids.sql with 100% similarity]
src/core/SQL/SQLite/19/select_buffers.sql [moved from src/core/SQL/SQLite/18/select_buffers.sql with 100% similarity]
src/core/SQL/SQLite/19/select_buffers_for_merge.sql [moved from src/core/SQL/SQLite/18/select_buffers_for_merge.sql with 100% similarity]
src/core/SQL/SQLite/19/select_buffers_for_network.sql [moved from src/core/SQL/SQLite/18/select_buffers_for_network.sql with 100% similarity]
src/core/SQL/SQLite/19/select_checkidentity.sql [moved from src/core/SQL/SQLite/18/select_checkidentity.sql with 100% similarity]
src/core/SQL/SQLite/19/select_connected_networks.sql [moved from src/core/SQL/SQLite/18/select_connected_networks.sql with 100% similarity]
src/core/SQL/SQLite/19/select_identities.sql [moved from src/core/SQL/SQLite/18/select_identities.sql with 100% similarity]
src/core/SQL/SQLite/19/select_internaluser.sql [moved from src/core/SQL/SQLite/18/select_internaluser.sql with 100% similarity]
src/core/SQL/SQLite/19/select_messages.sql [moved from src/core/SQL/SQLite/18/select_messages.sql with 100% similarity]
src/core/SQL/SQLite/19/select_messagesAll.sql [moved from src/core/SQL/SQLite/18/select_messagesAll.sql with 100% similarity]
src/core/SQL/SQLite/19/select_messagesAllNew.sql [moved from src/core/SQL/SQLite/18/select_messagesAllNew.sql with 100% similarity]
src/core/SQL/SQLite/19/select_messagesNewerThan.sql [moved from src/core/SQL/SQLite/18/select_messagesNewerThan.sql with 100% similarity]
src/core/SQL/SQLite/19/select_messagesNewestK.sql [moved from src/core/SQL/SQLite/18/select_messagesNewestK.sql with 100% similarity]
src/core/SQL/SQLite/19/select_networkExists.sql [moved from src/core/SQL/SQLite/18/select_networkExists.sql with 100% similarity]
src/core/SQL/SQLite/19/select_network_awaymsg.sql [moved from src/core/SQL/SQLite/18/select_network_awaymsg.sql with 100% similarity]
src/core/SQL/SQLite/19/select_network_usermode.sql [moved from src/core/SQL/SQLite/18/select_network_usermode.sql with 100% similarity]
src/core/SQL/SQLite/19/select_networks_for_user.sql [moved from src/core/SQL/SQLite/18/select_networks_for_user.sql with 100% similarity]
src/core/SQL/SQLite/19/select_nicks.sql [moved from src/core/SQL/SQLite/18/select_nicks.sql with 100% similarity]
src/core/SQL/SQLite/19/select_persistent_channels.sql [moved from src/core/SQL/SQLite/18/select_persistent_channels.sql with 100% similarity]
src/core/SQL/SQLite/19/select_servers_for_network.sql [moved from src/core/SQL/SQLite/18/select_servers_for_network.sql with 63% similarity]
src/core/SQL/SQLite/19/select_user_setting.sql [moved from src/core/SQL/SQLite/18/select_user_setting.sql with 100% similarity]
src/core/SQL/SQLite/19/select_userid.sql [moved from src/core/SQL/SQLite/18/select_userid.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_000_quasseluser.sql [moved from src/core/SQL/SQLite/18/setup_000_quasseluser.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_010_sender.sql [moved from src/core/SQL/SQLite/18/setup_010_sender.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_020_network.sql [moved from src/core/SQL/SQLite/18/setup_020_network.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_030_buffer.sql [moved from src/core/SQL/SQLite/18/setup_030_buffer.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_040_buffer_idx.sql [moved from src/core/SQL/SQLite/18/setup_040_buffer_idx.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_050_buffer_cname_idx.sql [moved from src/core/SQL/SQLite/18/setup_050_buffer_cname_idx.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_060_backlog.sql [moved from src/core/SQL/SQLite/18/setup_060_backlog.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_070_coreinfo.sql [moved from src/core/SQL/SQLite/18/setup_070_coreinfo.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_080_ircservers.sql [moved from src/core/SQL/SQLite/18/setup_080_ircservers.sql with 85% similarity]
src/core/SQL/SQLite/19/setup_090_backlog_idx.sql [moved from src/core/SQL/SQLite/18/setup_090_backlog_idx.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_100_backlog_idx2.sql [moved from src/core/SQL/SQLite/18/setup_100_backlog_idx2.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_110_buffer_user_idx.sql [moved from src/core/SQL/SQLite/18/setup_110_buffer_user_idx.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_120_user_setting.sql [moved from src/core/SQL/SQLite/18/setup_120_user_setting.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_130_identity.sql [moved from src/core/SQL/SQLite/18/setup_130_identity.sql with 100% similarity]
src/core/SQL/SQLite/19/setup_140_identity_nick.sql [moved from src/core/SQL/SQLite/18/setup_140_identity_nick.sql with 100% similarity]
src/core/SQL/SQLite/19/update_backlog_bufferid.sql [moved from src/core/SQL/SQLite/18/update_backlog_bufferid.sql with 100% similarity]
src/core/SQL/SQLite/19/update_buffer_lastseen.sql [moved from src/core/SQL/SQLite/18/update_buffer_lastseen.sql with 100% similarity]
src/core/SQL/SQLite/19/update_buffer_markerlinemsgid.sql [moved from src/core/SQL/SQLite/18/update_buffer_markerlinemsgid.sql with 100% similarity]
src/core/SQL/SQLite/19/update_buffer_name.sql [moved from src/core/SQL/SQLite/18/update_buffer_name.sql with 100% similarity]
src/core/SQL/SQLite/19/update_buffer_persistent_channel.sql [moved from src/core/SQL/SQLite/18/update_buffer_persistent_channel.sql with 100% similarity]
src/core/SQL/SQLite/19/update_buffer_set_channel_key.sql [moved from src/core/SQL/SQLite/18/update_buffer_set_channel_key.sql with 100% similarity]
src/core/SQL/SQLite/19/update_identity.sql [moved from src/core/SQL/SQLite/18/update_identity.sql with 100% similarity]
src/core/SQL/SQLite/19/update_network.sql [moved from src/core/SQL/SQLite/18/update_network.sql with 100% similarity]
src/core/SQL/SQLite/19/update_network_connected.sql [moved from src/core/SQL/SQLite/18/update_network_connected.sql with 100% similarity]
src/core/SQL/SQLite/19/update_network_set_awaymsg.sql [moved from src/core/SQL/SQLite/18/update_network_set_awaymsg.sql with 100% similarity]
src/core/SQL/SQLite/19/update_network_set_usermode.sql [moved from src/core/SQL/SQLite/18/update_network_set_usermode.sql with 100% similarity]
src/core/SQL/SQLite/19/update_user_setting.sql [moved from src/core/SQL/SQLite/18/update_user_setting.sql with 100% similarity]
src/core/SQL/SQLite/19/update_username.sql [moved from src/core/SQL/SQLite/18/update_username.sql with 100% similarity]
src/core/SQL/SQLite/19/update_userpassword.sql [moved from src/core/SQL/SQLite/18/update_userpassword.sql with 100% similarity]
src/core/SQL/SQLite/19/upgrade_000_alter_ircserver_add_sslverify.sql [new file with mode: 0644]
src/core/abstractsqlstorage.h
src/core/corenetwork.cpp
src/core/postgresqlstorage.cpp
src/core/sql.qrc
src/core/sqlitestorage.cpp
src/qtui/settingspages/networkadddlg.ui
src/qtui/settingspages/networkssettingspage.cpp
src/qtui/settingspages/servereditdlg.ui

index ef24220..cde2af7 100644 (file)
@@ -1111,6 +1111,7 @@ QDataStream &operator<<(QDataStream &out, const Network::Server &server)
     serverMap["Port"] = server.port;
     serverMap["Password"] = server.password;
     serverMap["UseSSL"] = server.useSsl;
+    serverMap["sslVerify"] = server.sslVerify;
     serverMap["sslVersion"] = server.sslVersion;
     serverMap["UseProxy"] = server.useProxy;
     serverMap["ProxyType"] = server.proxyType;
@@ -1131,6 +1132,7 @@ QDataStream &operator>>(QDataStream &in, Network::Server &server)
     server.port = serverMap["Port"].toUInt();
     server.password = serverMap["Password"].toString();
     server.useSsl = serverMap["UseSSL"].toBool();
+    server.sslVerify = serverMap["sslVerify"].toBool();
     server.sslVersion = serverMap["sslVersion"].toInt();
     server.useProxy = serverMap["UseProxy"].toBool();
     server.proxyType = serverMap["ProxyType"].toInt();
@@ -1148,6 +1150,7 @@ bool Network::Server::operator==(const Server &other) const
     if (port != other.port) return false;
     if (password != other.password) return false;
     if (useSsl != other.useSsl) return false;
+    if (sslVerify != other.sslVerify) return false;
     if (sslVersion != other.sslVersion) return false;
     if (useProxy != other.useProxy) return false;
     if (proxyType != other.proxyType) return false;
@@ -1167,6 +1170,7 @@ bool Network::Server::operator!=(const Server &other) const
 
 QDebug operator<<(QDebug dbg, const Network::Server &server)
 {
-    dbg.nospace() << "Server(host = " << server.host << ":" << server.port << ", useSsl = " << server.useSsl << ")";
+    dbg.nospace() << "Server(host = " << server.host << ":" << server.port << ", useSsl = " <<
+                     server.useSsl << ", sslVerify = " << server.sslVerify << ")";
     return dbg.space();
 }
index 09310fd..99732d9 100644 (file)
@@ -101,6 +101,7 @@ public :
         uint port;
         QString password;
         bool useSsl;
+        bool sslVerify;     /// If true, validate SSL certificates
         int sslVersion;
 
         bool useProxy;
@@ -110,10 +111,17 @@ public :
         QString proxyUser;
         QString proxyPass;
 
-        Server() : port(6667), useSsl(false), sslVersion(0), useProxy(false), proxyType(QNetworkProxy::Socks5Proxy), proxyHost("localhost"), proxyPort(8080) {}
-        Server(const QString &host, uint port, const QString &password, bool useSsl)
-            : host(host), port(port), password(password), useSsl(useSsl), sslVersion(0),
-            useProxy(false), proxyType(QNetworkProxy::Socks5Proxy), proxyHost("localhost"), proxyPort(8080) {}
+        // sslVerify only applies when useSsl is true.  sslVerify should be enabled by default,
+        // so enabling useSsl offers a more secure default.
+        Server() : port(6667), useSsl(false), sslVerify(true), sslVersion(0), useProxy(false),
+            proxyType(QNetworkProxy::Socks5Proxy), proxyHost("localhost"), proxyPort(8080) {}
+
+        Server(const QString &host, uint port, const QString &password, bool useSsl,
+               bool sslVerify)
+            : host(host), port(port), password(password), useSsl(useSsl), sslVerify(sslVerify),
+              sslVersion(0), useProxy(false), proxyType(QNetworkProxy::Socks5Proxy),
+              proxyHost("localhost"), proxyPort(8080) {}
+
         bool operator==(const Server &other) const;
         bool operator!=(const Server &other) const;
     };
index d4a582f..64e1094 100644 (file)
@@ -86,7 +86,8 @@ NetworkInfo PresetNetworks::networkInfo(const QString &networkName)
                 qWarning() << "Invalid port entry in networks.conf:" << server;
                 continue;
             }
-            info.serverList << Network::Server(splitserver[0].trimmed(), port, QString(), ssl);
+            // TODO Should networks.conf be modified to allow requiring SSL?
+            info.serverList << Network::Server(splitserver[0].trimmed(), port, QString(), ssl, false);
         }
     }
     return info;
index 09a5d84..a2a573c 100644 (file)
@@ -72,8 +72,9 @@ public:
         HideInactiveNetworks = 0x0008,
         PasswordChange = 0x0010,
         CapNegotiation = 0x0020,           /// IRCv3 capability negotiation, account tracking
+        VerifyServerSSL = 0x0040,          /// IRC server SSL validation
 
-        NumFeatures = 0x0020
+        NumFeatures = 0x0040
     };
     Q_DECLARE_FLAGS(Features, Feature)
 
similarity index 79%
rename from src/core/SQL/PostgreSQL/17/insert_server.sql
rename to src/core/SQL/PostgreSQL/18/insert_server.sql
index d9605eb..e775088 100644 (file)
@@ -1,2 +1,2 @@
-INSERT INTO ircserver (userid, networkid, hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass)
-VALUES (:userid, :networkid, :hostname, :port, :password, :ssl, :sslversion, :useproxy, :proxytype, :proxyhost, :proxyport, :proxyuser, :proxypass)
+INSERT INTO ircserver (userid, networkid, hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass, sslverify)
+VALUES (:userid, :networkid, :hostname, :port, :password, :ssl, :sslversion, :useproxy, :proxytype, :proxyhost, :proxyport, :proxyuser, :proxypass, :sslverify)
@@ -1,2 +1,2 @@
-INSERT INTO ircserver (serverid, userid, networkid, hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass)
-VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+INSERT INTO ircserver (serverid, userid, networkid, hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass, sslverify)
+VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
@@ -1,3 +1,3 @@
-SELECT hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass
+SELECT hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass, sslverify
 FROM ircserver
 WHERE networkid = :networkid
@@ -12,5 +12,6 @@ CREATE TABLE ircserver (
     proxyhost varchar(128) NOT NULL DEFAULT 'localhost',
     proxyport integer NOT NULL DEFAULT 8080,
     proxyuser varchar(64),
-    proxypass varchar(64)
+    proxypass varchar(64),
+    sslverify boolean NOT NULL DEFAULT FALSE -- bool, validate SSL cert
 )
diff --git a/src/core/SQL/PostgreSQL/18/upgrade_000_alter_ircserver_add_sslverify.sql b/src/core/SQL/PostgreSQL/18/upgrade_000_alter_ircserver_add_sslverify.sql
new file mode 100644 (file)
index 0000000..851c87e
--- /dev/null
@@ -0,0 +1,2 @@
+ALTER TABLE ircserver
+ADD COLUMN sslverify boolean NOT NULL DEFAULT FALSE
similarity index 79%
rename from src/core/SQL/SQLite/18/insert_server.sql
rename to src/core/SQL/SQLite/19/insert_server.sql
index d9605eb..e775088 100644 (file)
@@ -1,2 +1,2 @@
-INSERT INTO ircserver (userid, networkid, hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass)
-VALUES (:userid, :networkid, :hostname, :port, :password, :ssl, :sslversion, :useproxy, :proxytype, :proxyhost, :proxyport, :proxyuser, :proxypass)
+INSERT INTO ircserver (userid, networkid, hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass, sslverify)
+VALUES (:userid, :networkid, :hostname, :port, :password, :ssl, :sslversion, :useproxy, :proxytype, :proxyhost, :proxyport, :proxyuser, :proxypass, :sslverify)
@@ -1,2 +1,2 @@
-SELECT serverid, userid, networkid, hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass
+SELECT serverid, userid, networkid, hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass, sslverify
 FROM ircserver
@@ -1,3 +1,3 @@
-SELECT hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass
+SELECT hostname, port, password, ssl, sslversion, useproxy, proxytype, proxyhost, proxyport, proxyuser, proxypass, sslverify
 FROM ircserver
 WHERE networkid = :networkid
@@ -12,5 +12,6 @@ CREATE TABLE ircserver (
     proxyhost TEXT NOT NULL DEFAULT 'localhost',
     proxyport INTEGER NOT NULL DEFAULT 8080,
     proxyuser TEXT,
-    proxypass TEXT
+    proxypass TEXT,
+    sslverify INTEGER NOT NULL DEFAULT 0 -- bool, validate SSL cert
 )
diff --git a/src/core/SQL/SQLite/19/upgrade_000_alter_ircserver_add_sslverify.sql b/src/core/SQL/SQLite/19/upgrade_000_alter_ircserver_add_sslverify.sql
new file mode 100644 (file)
index 0000000..7722756
--- /dev/null
@@ -0,0 +1,2 @@
+ALTER TABLE ircserver
+ADD COLUMN sslverify INTEGER NOT NULL DEFAULT 0
index a3e4f0e..06d19b7 100644 (file)
@@ -230,6 +230,7 @@ public:
         int port;
         QString password;
         bool ssl;
+        bool sslverify;     /// If true, validate SSL certificates
         int sslversion;
         bool useproxy;
         int proxytype;
index d8cb2bf..93d5b6a 100644 (file)
@@ -1114,9 +1114,33 @@ void CoreNetwork::sendAutoWho()
 #ifdef HAVE_SSL
 void CoreNetwork::sslErrors(const QList<QSslError> &sslErrors)
 {
-    Q_UNUSED(sslErrors)
-    socket.ignoreSslErrors();
-    // TODO errorhandling
+    Server server = usedServer();
+    if (server.sslVerify) {
+        // Treat the SSL error as a hard error
+        QString sslErrorMessage = tr("Encrypted connection couldn't be verified, disconnecting "
+                                     "since verification is required");
+        if (!sslErrors.empty()) {
+            // Add the error reason if known
+            sslErrorMessage.append(tr(" (Reason: %1)").arg(sslErrors.first().errorString()));
+        }
+        displayMsg(Message::Error, BufferInfo::StatusBuffer, "", sslErrorMessage);
+
+        // Disconnect, triggering a reconnect in case it's a temporary issue with certificate
+        // validity, network trouble, etc.
+        disconnectFromIrc(false, QString("Encrypted connection not verified"), true /* withReconnect */);
+    } else {
+        // Treat the SSL error as a warning, continue to connect anyways
+        QString sslErrorMessage = tr("Encrypted connection couldn't be verified, continuing "
+                                     "since verification is not required");
+        if (!sslErrors.empty()) {
+            // Add the error reason if known
+            sslErrorMessage.append(tr(" (Reason: %1)").arg(sslErrors.first().errorString()));
+        }
+        displayMsg(Message::Info, BufferInfo::StatusBuffer, "", sslErrorMessage);
+
+        // Proceed with the connection
+        socket.ignoreSslErrors();
+    }
 }
 
 
index 8438e62..5790478 100644 (file)
@@ -715,6 +715,7 @@ void PostgreSqlStorage::bindServerInfo(QSqlQuery &query, const Network::Server &
     query.bindValue(":proxyport", server.proxyPort);
     query.bindValue(":proxyuser", server.proxyUser);
     query.bindValue(":proxypass", server.proxyPass);
+    query.bindValue(":sslverify", server.sslVerify);
 }
 
 
@@ -864,6 +865,7 @@ QList<NetworkInfo> PostgreSqlStorage::networks(UserId user)
             server.proxyPort = serversQuery.value(8).toUInt();
             server.proxyUser = serversQuery.value(9).toString();
             server.proxyPass = serversQuery.value(10).toString();
+            server.sslVerify = serversQuery.value(11).toBool();
             servers << server;
         }
         net.serverList = servers;
@@ -1978,6 +1980,7 @@ bool PostgreSqlMigrationWriter::writeMo(const IrcServerMO &ircserver)
     bindValue(11, ircserver.proxyport);
     bindValue(12, ircserver.proxyuser);
     bindValue(13, ircserver.proxypass);
+    bindValue(14, ircserver.sslverify);
     return exec();
 }
 
index c72d14f..01b4555 100644 (file)
 <!DOCTYPE RCC><RCC version="1.0">
 <qresource>
-    <file>./SQL/SQLite/16/upgrade_000_alter_buffer_add_markerlinemsgid.sql</file>
-    <file>./SQL/SQLite/17/upgrade_001_alter_network_add_sasl.sql</file>
-    <file>./SQL/SQLite/17/upgrade_000_alter_network_add_sasl.sql</file>
-    <file>./SQL/SQLite/17/upgrade_002_alter_network_add_sasl.sql</file>
-    <file>./SQL/SQLite/18/update_buffer_persistent_channel.sql</file>
-    <file>./SQL/SQLite/18/insert_network.sql</file>
-    <file>./SQL/SQLite/18/insert_identity.sql</file>
-    <file>./SQL/SQLite/18/select_checkidentity.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_identity.sql</file>
-    <file>./SQL/SQLite/18/update_identity.sql</file>
-    <file>./SQL/SQLite/18/delete_buffer_for_bufferid.sql</file>
-    <file>./SQL/SQLite/18/setup_120_user_setting.sql</file>
-    <file>./SQL/SQLite/18/select_networks_for_user.sql</file>
-    <file>./SQL/SQLite/18/select_networkExists.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_network.sql</file>
-    <file>./SQL/SQLite/18/setup_130_identity.sql</file>
-    <file>./SQL/SQLite/18/select_messagesNewestK.sql</file>
-    <file>./SQL/SQLite/18/setup_100_backlog_idx2.sql</file>
-    <file>./SQL/SQLite/18/select_messagesAllNew.sql</file>
-    <file>./SQL/SQLite/18/select_buffers_for_merge.sql</file>
-    <file>./SQL/SQLite/18/delete_ircservers_for_network.sql</file>
-    <file>./SQL/SQLite/18/select_persistent_channels.sql</file>
-    <file>./SQL/SQLite/18/update_buffer_set_channel_key.sql</file>
-    <file>./SQL/SQLite/18/setup_040_buffer_idx.sql</file>
-    <file>./SQL/SQLite/18/select_messagesNewerThan.sql</file>
-    <file>./SQL/SQLite/18/setup_070_coreinfo.sql</file>
-    <file>./SQL/SQLite/18/insert_nick.sql</file>
-    <file>./SQL/SQLite/18/select_messagesAll.sql</file>
-    <file>./SQL/SQLite/18/delete_identity.sql</file>
-    <file>./SQL/SQLite/18/select_buffer_markerlinemsgids.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_identity_nick.sql</file>
-    <file>./SQL/SQLite/18/select_buffer_lastseen_messages.sql</file>
-    <file>./SQL/SQLite/18/insert_sender.sql</file>
-    <file>./SQL/SQLite/18/select_nicks.sql</file>
-    <file>./SQL/SQLite/18/setup_030_buffer.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_sender.sql</file>
-    <file>./SQL/SQLite/18/insert_user_setting.sql</file>
-    <file>./SQL/SQLite/18/delete_buffers_for_network.sql</file>
-    <file>./SQL/SQLite/18/select_messages.sql</file>
-    <file>./SQL/SQLite/18/select_buffers.sql</file>
-    <file>./SQL/SQLite/18/select_userid.sql</file>
-    <file>./SQL/SQLite/18/update_network.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_usersetting.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_quasseluser.sql</file>
-    <file>./SQL/SQLite/18/setup_010_sender.sql</file>
-    <file>./SQL/SQLite/18/delete_quasseluser.sql</file>
-    <file>./SQL/SQLite/18/select_network_usermode.sql</file>
-    <file>./SQL/SQLite/18/update_userpassword.sql</file>
-    <file>./SQL/SQLite/18/select_identities.sql</file>
-    <file>./SQL/SQLite/18/setup_000_quasseluser.sql</file>
-    <file>./SQL/SQLite/18/setup_080_ircservers.sql</file>
-    <file>./SQL/SQLite/18/delete_nicks.sql</file>
-    <file>./SQL/SQLite/18/delete_network.sql</file>
-    <file>./SQL/SQLite/18/select_servers_for_network.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_buffer.sql</file>
-    <file>./SQL/SQLite/18/select_connected_networks.sql</file>
-    <file>./SQL/SQLite/18/update_network_connected.sql</file>
-    <file>./SQL/SQLite/18/delete_backlog_for_network.sql</file>
-    <file>./SQL/SQLite/18/setup_060_backlog.sql</file>
-    <file>./SQL/SQLite/18/update_username.sql</file>
-    <file>./SQL/SQLite/18/insert_message.sql</file>
-    <file>./SQL/SQLite/18/select_buffer_by_id.sql</file>
-    <file>./SQL/SQLite/18/update_user_setting.sql</file>
-    <file>./SQL/SQLite/18/update_buffer_name.sql</file>
-    <file>./SQL/SQLite/18/select_bufferExists.sql</file>
-    <file>./SQL/SQLite/18/setup_110_buffer_user_idx.sql</file>
-    <file>./SQL/SQLite/18/select_buffers_for_network.sql</file>
-    <file>./SQL/SQLite/18/delete_backlog_by_uid.sql</file>
-    <file>./SQL/SQLite/18/select_internaluser.sql</file>
-    <file>./SQL/SQLite/18/select_network_awaymsg.sql</file>
-    <file>./SQL/SQLite/18/setup_090_backlog_idx.sql</file>
-    <file>./SQL/SQLite/18/insert_quasseluser.sql</file>
-    <file>./SQL/SQLite/18/update_network_set_usermode.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_ircserver.sql</file>
-    <file>./SQL/SQLite/18/delete_backlog_for_buffer.sql</file>
-    <file>./SQL/SQLite/18/update_network_set_awaymsg.sql</file>
-    <file>./SQL/SQLite/18/upgrade_000_alter_quasseluser_add_passwordversion.sql</file>
-    <file>./SQL/SQLite/18/update_backlog_bufferid.sql</file>
-    <file>./SQL/SQLite/18/update_buffer_markerlinemsgid.sql</file>
-    <file>./SQL/SQLite/18/update_buffer_lastseen.sql</file>
-    <file>./SQL/SQLite/18/setup_050_buffer_cname_idx.sql</file>
-    <file>./SQL/SQLite/18/insert_buffer.sql</file>
-    <file>./SQL/SQLite/18/select_authuser.sql</file>
-    <file>./SQL/SQLite/18/select_user_setting.sql</file>
-    <file>./SQL/SQLite/18/select_bufferByName.sql</file>
-    <file>./SQL/SQLite/18/insert_server.sql</file>
-    <file>./SQL/SQLite/18/setup_020_network.sql</file>
-    <file>./SQL/SQLite/18/migrate_read_backlog.sql</file>
-    <file>./SQL/SQLite/18/setup_140_identity_nick.sql</file>
-    <file>./SQL/SQLite/18/delete_networks_by_uid.sql</file>
-    <file>./SQL/SQLite/18/delete_buffers_by_uid.sql</file>
-    <file>./SQL/SQLite/15/upgrade_000_fix_ircservers.sql</file>
-    <file>./SQL/SQLite/15/upgrade_000_fix_network.sql</file>
-    <file>./SQL/SQLite/2/upgrade_010_update_schemaversion.sql</file>
+    <file>./SQL/SQLite/1/upgrade_000_drop_coreinfo.sql</file>
+    <file>./SQL/SQLite/1/upgrade_010_create_coreinfo.sql</file>
+    <file>./SQL/SQLite/1/upgrade_020_update_schemaversion.sql</file>
     <file>./SQL/SQLite/2/upgrade_000_drop_buffergroup.sql</file>
-    <file>./SQL/SQLite/5/upgrade_030_drop_oldnetworktable.sql</file>
-    <file>./SQL/SQLite/5/upgrade_020_copy_networktable.sql</file>
+    <file>./SQL/SQLite/2/upgrade_010_update_schemaversion.sql</file>
+    <file>./SQL/SQLite/3/upgrade_000_update_backlog_flags.sql</file>
+    <file>./SQL/SQLite/3/upgrade_010_update_schemaversion.sql</file>
+    <file>./SQL/SQLite/4/upgrade_000_rename_buffertable.sql</file>
+    <file>./SQL/SQLite/4/upgrade_010_create_buffertable.sql</file>
+    <file>./SQL/SQLite/4/upgrade_020_copy_buffertable.sql</file>
+    <file>./SQL/SQLite/4/upgrade_030_drop_oldbuffertable.sql</file>
+    <file>./SQL/SQLite/4/upgrade_040_create_buffer_idx.sql</file>
+    <file>./SQL/SQLite/4/upgrade_050_create_buffer_cname_idx.sql</file>
     <file>./SQL/SQLite/5/upgrade_000_rename_networktable.sql</file>
-    <file>./SQL/SQLite/5/upgrade_180_create_ircservers.sql</file>
     <file>./SQL/SQLite/5/upgrade_010_create_newnetworktable.sql</file>
-    <file>./SQL/SQLite/12/upgrade_050_drop_ircserverold.sql</file>
-    <file>./SQL/SQLite/12/upgrade_030_create_ircserver.sql</file>
-    <file>./SQL/SQLite/12/upgrade_010_create_identity_nick.sql</file>
-    <file>./SQL/SQLite/12/upgrade_040_copy_ircserver.sql</file>
-    <file>./SQL/SQLite/12/upgrade_000_create_identity.sql</file>
-    <file>./SQL/SQLite/12/upgrade_020_rename_servertable.sql</file>
-    <file>./SQL/SQLite/14/upgrade_000_rename_networktable.sql</file>
-    <file>./SQL/SQLite/14/upgrade_040_drop_networkold.sql</file>
-    <file>./SQL/SQLite/14/upgrade_010_create_networktable.sql</file>
-    <file>./SQL/SQLite/14/upgrade_030_copy_networktable.sql</file>
-    <file>./SQL/SQLite/13/upgrade_000_create_buffer_user_idx.sql</file>
-    <file>./SQL/SQLite/13/upgrade_020_create_buffer_cname_idx.sql</file>
-    <file>./SQL/SQLite/13/upgrade_010_create_buffer_cname_idx.sql</file>
-    <file>./SQL/SQLite/11/upgrade_000_create_user_setting.sql</file>
-    <file>./SQL/SQLite/3/upgrade_010_update_schemaversion.sql</file>
-    <file>./SQL/SQLite/3/upgrade_000_update_backlog_flags.sql</file>
-    <file>./SQL/SQLite/8/upgrade_000_alter_network_add_connected.sql</file>
-    <file>./SQL/SQLite/8/upgrade_020_alter_buffer_add_joined.sql</file>
-    <file>./SQL/SQLite/8/upgrade_010_alter_buffer_add_key.sql</file>
-    <file>./SQL/SQLite/8/upgrade_030_update_buffer_set_joined_for_channels.sql</file>
-    <file>./SQL/SQLite/6/upgrade_010_set_statusbuffertype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_080_update_msgtype.sql</file>
+    <file>./SQL/SQLite/5/upgrade_020_copy_networktable.sql</file>
+    <file>./SQL/SQLite/5/upgrade_030_drop_oldnetworktable.sql</file>
+    <file>./SQL/SQLite/5/upgrade_180_create_ircservers.sql</file>
     <file>./SQL/SQLite/6/upgrade_000_alter_buffertable.sql</file>
-    <file>./SQL/SQLite/6/upgrade_060_update_msgtype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_050_update_msgtype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_150_update_msgtype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_100_update_msgtype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_040_update_msgtype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_130_update_msgtype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_160_update_msgtype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_010_set_statusbuffertype.sql</file>
     <file>./SQL/SQLite/6/upgrade_020_set_channelbuffertype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_030_set_querybuffertype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_040_update_msgtype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_050_update_msgtype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_060_update_msgtype.sql</file>
     <file>./SQL/SQLite/6/upgrade_070_update_msgtype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_080_update_msgtype.sql</file>
     <file>./SQL/SQLite/6/upgrade_090_update_msgtype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_030_set_querybuffertype.sql</file>
-    <file>./SQL/SQLite/6/upgrade_120_update_msgtype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_100_update_msgtype.sql</file>
     <file>./SQL/SQLite/6/upgrade_110_update_msgtype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_120_update_msgtype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_130_update_msgtype.sql</file>
     <file>./SQL/SQLite/6/upgrade_140_update_msgtype.sql</file>
-    <file>./SQL/SQLite/4/upgrade_010_create_buffertable.sql</file>
-    <file>./SQL/SQLite/4/upgrade_040_create_buffer_idx.sql</file>
-    <file>./SQL/SQLite/4/upgrade_020_copy_buffertable.sql</file>
-    <file>./SQL/SQLite/4/upgrade_030_drop_oldbuffertable.sql</file>
-    <file>./SQL/SQLite/4/upgrade_000_rename_buffertable.sql</file>
-    <file>./SQL/SQLite/4/upgrade_050_create_buffer_cname_idx.sql</file>
-    <file>./SQL/SQLite/7/upgrade_030_drop_oldnetworktable.sql</file>
-    <file>./SQL/SQLite/7/upgrade_020_copy_networktable.sql</file>
+    <file>./SQL/SQLite/6/upgrade_150_update_msgtype.sql</file>
+    <file>./SQL/SQLite/6/upgrade_160_update_msgtype.sql</file>
     <file>./SQL/SQLite/7/upgrade_000_rename_networktable.sql</file>
     <file>./SQL/SQLite/7/upgrade_010_create_newnetworktable.sql</file>
+    <file>./SQL/SQLite/7/upgrade_020_copy_networktable.sql</file>
+    <file>./SQL/SQLite/7/upgrade_030_drop_oldnetworktable.sql</file>
     <file>./SQL/SQLite/7/upgrade_040_alter_buffer_add_lastseen.sql</file>
-    <file>./SQL/SQLite/1/upgrade_010_create_coreinfo.sql</file>
-    <file>./SQL/SQLite/1/upgrade_020_update_schemaversion.sql</file>
-    <file>./SQL/SQLite/1/upgrade_000_drop_coreinfo.sql</file>
-    <file>./SQL/SQLite/10/upgrade_040_drop_buffer_old_table.sql</file>
-    <file>./SQL/SQLite/10/upgrade_030_copy_buffer_table.sql</file>
+    <file>./SQL/SQLite/8/upgrade_000_alter_network_add_connected.sql</file>
+    <file>./SQL/SQLite/8/upgrade_010_alter_buffer_add_key.sql</file>
+    <file>./SQL/SQLite/8/upgrade_020_alter_buffer_add_joined.sql</file>
+    <file>./SQL/SQLite/8/upgrade_030_update_buffer_set_joined_for_channels.sql</file>
+    <file>./SQL/SQLite/9/upgrade_000_create_backlog_idx.sql</file>
+    <file>./SQL/SQLite/9/upgrade_010_create_backlog_idx2.sql</file>
+    <file>./SQL/SQLite/9/upgrade_020_create_buffer_idx.sql</file>
     <file>./SQL/SQLite/10/upgrade_000_switch_to_msgid.sql</file>
-    <file>./SQL/SQLite/10/upgrade_020_create_buffer_table.sql</file>
     <file>./SQL/SQLite/10/upgrade_010_rename_buffer_table.sql</file>
-    <file>./SQL/SQLite/9/upgrade_020_create_buffer_idx.sql</file>
-    <file>./SQL/SQLite/9/upgrade_010_create_backlog_idx2.sql</file>
-    <file>./SQL/SQLite/9/upgrade_000_create_backlog_idx.sql</file>
+    <file>./SQL/SQLite/10/upgrade_020_create_buffer_table.sql</file>
+    <file>./SQL/SQLite/10/upgrade_030_copy_buffer_table.sql</file>
+    <file>./SQL/SQLite/10/upgrade_040_drop_buffer_old_table.sql</file>
+    <file>./SQL/SQLite/11/upgrade_000_create_user_setting.sql</file>
+    <file>./SQL/SQLite/12/upgrade_000_create_identity.sql</file>
+    <file>./SQL/SQLite/12/upgrade_010_create_identity_nick.sql</file>
+    <file>./SQL/SQLite/12/upgrade_020_rename_servertable.sql</file>
+    <file>./SQL/SQLite/12/upgrade_030_create_ircserver.sql</file>
+    <file>./SQL/SQLite/12/upgrade_040_copy_ircserver.sql</file>
+    <file>./SQL/SQLite/12/upgrade_050_drop_ircserverold.sql</file>
+    <file>./SQL/SQLite/13/upgrade_000_create_buffer_user_idx.sql</file>
+    <file>./SQL/SQLite/13/upgrade_010_create_buffer_cname_idx.sql</file>
+    <file>./SQL/SQLite/13/upgrade_020_create_buffer_cname_idx.sql</file>
+    <file>./SQL/SQLite/14/upgrade_000_rename_networktable.sql</file>
+    <file>./SQL/SQLite/14/upgrade_010_create_networktable.sql</file>
+    <file>./SQL/SQLite/14/upgrade_030_copy_networktable.sql</file>
+    <file>./SQL/SQLite/14/upgrade_040_drop_networkold.sql</file>
+    <file>./SQL/SQLite/15/upgrade_000_fix_ircservers.sql</file>
+    <file>./SQL/SQLite/15/upgrade_000_fix_network.sql</file>
+    <file>./SQL/SQLite/16/upgrade_000_alter_buffer_add_markerlinemsgid.sql</file>
+    <file>./SQL/SQLite/17/upgrade_000_alter_network_add_sasl.sql</file>
+    <file>./SQL/SQLite/17/upgrade_001_alter_network_add_sasl.sql</file>
+    <file>./SQL/SQLite/17/upgrade_002_alter_network_add_sasl.sql</file>
+    <file>./SQL/SQLite/18/upgrade_000_alter_quasseluser_add_passwordversion.sql</file>
+    <file>./SQL/SQLite/19/delete_backlog_by_uid.sql</file>
+    <file>./SQL/SQLite/19/delete_backlog_for_buffer.sql</file>
+    <file>./SQL/SQLite/19/delete_backlog_for_network.sql</file>
+    <file>./SQL/SQLite/19/delete_buffer_for_bufferid.sql</file>
+    <file>./SQL/SQLite/19/delete_buffers_by_uid.sql</file>
+    <file>./SQL/SQLite/19/delete_buffers_for_network.sql</file>
+    <file>./SQL/SQLite/19/delete_identity.sql</file>
+    <file>./SQL/SQLite/19/delete_ircservers_for_network.sql</file>
+    <file>./SQL/SQLite/19/delete_networks_by_uid.sql</file>
+    <file>./SQL/SQLite/19/delete_network.sql</file>
+    <file>./SQL/SQLite/19/delete_nicks.sql</file>
+    <file>./SQL/SQLite/19/delete_quasseluser.sql</file>
+    <file>./SQL/SQLite/19/insert_buffer.sql</file>
+    <file>./SQL/SQLite/19/insert_identity.sql</file>
+    <file>./SQL/SQLite/19/insert_message.sql</file>
+    <file>./SQL/SQLite/19/insert_network.sql</file>
+    <file>./SQL/SQLite/19/insert_nick.sql</file>
+    <file>./SQL/SQLite/19/insert_quasseluser.sql</file>
+    <file>./SQL/SQLite/19/insert_sender.sql</file>
+    <file>./SQL/SQLite/19/insert_server.sql</file>
+    <file>./SQL/SQLite/19/insert_user_setting.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_backlog.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_buffer.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_identity_nick.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_identity.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_ircserver.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_network.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_quasseluser.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_sender.sql</file>
+    <file>./SQL/SQLite/19/migrate_read_usersetting.sql</file>
+    <file>./SQL/SQLite/19/select_authuser.sql</file>
+    <file>./SQL/SQLite/19/select_buffer_by_id.sql</file>
+    <file>./SQL/SQLite/19/select_bufferByName.sql</file>
+    <file>./SQL/SQLite/19/select_bufferExists.sql</file>
+    <file>./SQL/SQLite/19/select_buffer_lastseen_messages.sql</file>
+    <file>./SQL/SQLite/19/select_buffer_markerlinemsgids.sql</file>
+    <file>./SQL/SQLite/19/select_buffers_for_merge.sql</file>
+    <file>./SQL/SQLite/19/select_buffers_for_network.sql</file>
+    <file>./SQL/SQLite/19/select_buffers.sql</file>
+    <file>./SQL/SQLite/19/select_checkidentity.sql</file>
+    <file>./SQL/SQLite/19/select_connected_networks.sql</file>
+    <file>./SQL/SQLite/19/select_identities.sql</file>
+    <file>./SQL/SQLite/19/select_internaluser.sql</file>
+    <file>./SQL/SQLite/19/select_messagesAllNew.sql</file>
+    <file>./SQL/SQLite/19/select_messagesAll.sql</file>
+    <file>./SQL/SQLite/19/select_messagesNewerThan.sql</file>
+    <file>./SQL/SQLite/19/select_messagesNewestK.sql</file>
+    <file>./SQL/SQLite/19/select_messages.sql</file>
+    <file>./SQL/SQLite/19/select_network_awaymsg.sql</file>
+    <file>./SQL/SQLite/19/select_networkExists.sql</file>
+    <file>./SQL/SQLite/19/select_networks_for_user.sql</file>
+    <file>./SQL/SQLite/19/select_network_usermode.sql</file>
+    <file>./SQL/SQLite/19/select_nicks.sql</file>
+    <file>./SQL/SQLite/19/select_persistent_channels.sql</file>
+    <file>./SQL/SQLite/19/select_servers_for_network.sql</file>
+    <file>./SQL/SQLite/19/select_userid.sql</file>
+    <file>./SQL/SQLite/19/select_user_setting.sql</file>
+    <file>./SQL/SQLite/19/setup_000_quasseluser.sql</file>
+    <file>./SQL/SQLite/19/setup_010_sender.sql</file>
+    <file>./SQL/SQLite/19/setup_020_network.sql</file>
+    <file>./SQL/SQLite/19/setup_030_buffer.sql</file>
+    <file>./SQL/SQLite/19/setup_040_buffer_idx.sql</file>
+    <file>./SQL/SQLite/19/setup_050_buffer_cname_idx.sql</file>
+    <file>./SQL/SQLite/19/setup_060_backlog.sql</file>
+    <file>./SQL/SQLite/19/setup_070_coreinfo.sql</file>
+    <file>./SQL/SQLite/19/setup_080_ircservers.sql</file>
+    <file>./SQL/SQLite/19/setup_090_backlog_idx.sql</file>
+    <file>./SQL/SQLite/19/setup_100_backlog_idx2.sql</file>
+    <file>./SQL/SQLite/19/setup_110_buffer_user_idx.sql</file>
+    <file>./SQL/SQLite/19/setup_120_user_setting.sql</file>
+    <file>./SQL/SQLite/19/setup_130_identity.sql</file>
+    <file>./SQL/SQLite/19/setup_140_identity_nick.sql</file>
+    <file>./SQL/SQLite/19/update_backlog_bufferid.sql</file>
+    <file>./SQL/SQLite/19/update_buffer_lastseen.sql</file>
+    <file>./SQL/SQLite/19/update_buffer_markerlinemsgid.sql</file>
+    <file>./SQL/SQLite/19/update_buffer_name.sql</file>
+    <file>./SQL/SQLite/19/update_buffer_persistent_channel.sql</file>
+    <file>./SQL/SQLite/19/update_buffer_set_channel_key.sql</file>
+    <file>./SQL/SQLite/19/update_identity.sql</file>
+    <file>./SQL/SQLite/19/update_network_connected.sql</file>
+    <file>./SQL/SQLite/19/update_network_set_awaymsg.sql</file>
+    <file>./SQL/SQLite/19/update_network_set_usermode.sql</file>
+    <file>./SQL/SQLite/19/update_network.sql</file>
+    <file>./SQL/SQLite/19/update_username.sql</file>
+    <file>./SQL/SQLite/19/update_userpassword.sql</file>
+    <file>./SQL/SQLite/19/update_user_setting.sql</file>
+    <file>./SQL/SQLite/19/upgrade_000_alter_ircserver_add_sslverify.sql</file>
+    <file>./SQL/PostgreSQL/15/upgrade_000_alter_buffer_add_markerlinemsgid.sql</file>
     <file>./SQL/PostgreSQL/16/upgrade_000_alter_network_add_sasl.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_120_alter_messageid_seq.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_030_identity_nick.sql</file>
-    <file>./SQL/PostgreSQL/17/update_buffer_persistent_channel.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_network.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_identity.sql</file>
-    <file>./SQL/PostgreSQL/17/select_checkidentity.sql</file>
-    <file>./SQL/PostgreSQL/17/update_identity.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_buffer_for_bufferid.sql</file>
-    <file>./SQL/PostgreSQL/17/select_networks_for_user.sql</file>
-    <file>./SQL/PostgreSQL/17/select_networkExists.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_backlog.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_identity_nick.sql</file>
-    <file>./SQL/PostgreSQL/17/select_messagesAllNew.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_ircservers_for_network.sql</file>
-    <file>./SQL/PostgreSQL/17/select_persistent_channels.sql</file>
-    <file>./SQL/PostgreSQL/17/update_buffer_set_channel_key.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_ircserver.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_040_network.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_buffer.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_usersetting.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_050_buffer.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_identity.sql</file>
-    <file>./SQL/PostgreSQL/17/select_messagesNewerThan.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_070_coreinfo.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_nick.sql</file>
-    <file>./SQL/PostgreSQL/17/select_messagesAll.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_identity.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_110_alter_sender_seq.sql</file>
-    <file>./SQL/PostgreSQL/17/select_senderid.sql</file>
-    <file>./SQL/PostgreSQL/17/select_buffer_markerlinemsgids.sql</file>
-    <file>./SQL/PostgreSQL/17/select_buffer_lastseen_messages.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_sender.sql</file>
-    <file>./SQL/PostgreSQL/17/select_nicks.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_user_setting.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_020_identity.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_buffers_for_network.sql</file>
-    <file>./SQL/PostgreSQL/17/select_messages.sql</file>
-    <file>./SQL/PostgreSQL/17/select_buffers.sql</file>
-    <file>./SQL/PostgreSQL/17/select_userid.sql</file>
-    <file>./SQL/PostgreSQL/17/update_network.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_010_sender.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_quasseluser.sql</file>
-    <file>./SQL/PostgreSQL/17/select_network_usermode.sql</file>
-    <file>./SQL/PostgreSQL/17/update_userpassword.sql</file>
-    <file>./SQL/PostgreSQL/17/select_identities.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_000_quasseluser.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_080_ircservers.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_nicks.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_quasseluser.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_network.sql</file>
-    <file>./SQL/PostgreSQL/17/select_servers_for_network.sql</file>
-    <file>./SQL/PostgreSQL/17/select_connected_networks.sql</file>
-    <file>./SQL/PostgreSQL/17/update_network_connected.sql</file>
-    <file>./SQL/PostgreSQL/17/select_messagesRange.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_backlog_for_network.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_060_backlog.sql</file>
-    <file>./SQL/PostgreSQL/17/update_username.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_message.sql</file>
-    <file>./SQL/PostgreSQL/17/select_buffer_by_id.sql</file>
-    <file>./SQL/PostgreSQL/17/update_user_setting.sql</file>
-    <file>./SQL/PostgreSQL/17/update_buffer_name.sql</file>
-    <file>./SQL/PostgreSQL/17/select_bufferExists.sql</file>
-    <file>./SQL/PostgreSQL/17/select_buffers_for_network.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_backlog_by_uid.sql</file>
-    <file>./SQL/PostgreSQL/17/select_internaluser.sql</file>
-    <file>./SQL/PostgreSQL/17/select_network_awaymsg.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_090_backlog_idx.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_quasseluser.sql</file>
-    <file>./SQL/PostgreSQL/17/update_network_set_usermode.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_backlog_for_buffer.sql</file>
-    <file>./SQL/PostgreSQL/17/update_network_set_awaymsg.sql</file>
     <file>./SQL/PostgreSQL/17/upgrade_000_alter_quasseluser_add_passwordversion.sql</file>
-    <file>./SQL/PostgreSQL/17/update_backlog_bufferid.sql</file>
-    <file>./SQL/PostgreSQL/17/update_buffer_markerlinemsgid.sql</file>
-    <file>./SQL/PostgreSQL/17/update_buffer_lastseen.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_buffer.sql</file>
-    <file>./SQL/PostgreSQL/17/select_authuser.sql</file>
-    <file>./SQL/PostgreSQL/17/select_user_setting.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_network.sql</file>
-    <file>./SQL/PostgreSQL/17/select_bufferByName.sql</file>
-    <file>./SQL/PostgreSQL/17/insert_server.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_networks_by_uid.sql</file>
-    <file>./SQL/PostgreSQL/17/migrate_write_sender.sql</file>
-    <file>./SQL/PostgreSQL/17/delete_buffers_by_uid.sql</file>
-    <file>./SQL/PostgreSQL/17/setup_100_user_setting.sql</file>
-    <file>./SQL/PostgreSQL/15/upgrade_000_alter_buffer_add_markerlinemsgid.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_backlog_by_uid.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_backlog_for_buffer.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_backlog_for_network.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_buffer_for_bufferid.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_buffers_by_uid.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_buffers_for_network.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_identity.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_ircservers_for_network.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_networks_by_uid.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_network.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_nicks.sql</file>
+    <file>./SQL/PostgreSQL/18/delete_quasseluser.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_buffer.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_identity.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_message.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_network.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_nick.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_quasseluser.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_sender.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_server.sql</file>
+    <file>./SQL/PostgreSQL/18/insert_user_setting.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_backlog.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_buffer.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_identity_nick.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_identity.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_ircserver.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_network.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_quasseluser.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_sender.sql</file>
+    <file>./SQL/PostgreSQL/18/migrate_write_usersetting.sql</file>
+    <file>./SQL/PostgreSQL/18/select_authuser.sql</file>
+    <file>./SQL/PostgreSQL/18/select_buffer_by_id.sql</file>
+    <file>./SQL/PostgreSQL/18/select_bufferByName.sql</file>
+    <file>./SQL/PostgreSQL/18/select_bufferExists.sql</file>
+    <file>./SQL/PostgreSQL/18/select_buffer_lastseen_messages.sql</file>
+    <file>./SQL/PostgreSQL/18/select_buffer_markerlinemsgids.sql</file>
+    <file>./SQL/PostgreSQL/18/select_buffers_for_network.sql</file>
+    <file>./SQL/PostgreSQL/18/select_buffers.sql</file>
+    <file>./SQL/PostgreSQL/18/select_checkidentity.sql</file>
+    <file>./SQL/PostgreSQL/18/select_connected_networks.sql</file>
+    <file>./SQL/PostgreSQL/18/select_identities.sql</file>
+    <file>./SQL/PostgreSQL/18/select_internaluser.sql</file>
+    <file>./SQL/PostgreSQL/18/select_messagesAllNew.sql</file>
+    <file>./SQL/PostgreSQL/18/select_messagesAll.sql</file>
+    <file>./SQL/PostgreSQL/18/select_messagesNewerThan.sql</file>
+    <file>./SQL/PostgreSQL/18/select_messagesRange.sql</file>
+    <file>./SQL/PostgreSQL/18/select_messages.sql</file>
+    <file>./SQL/PostgreSQL/18/select_network_awaymsg.sql</file>
+    <file>./SQL/PostgreSQL/18/select_networkExists.sql</file>
+    <file>./SQL/PostgreSQL/18/select_networks_for_user.sql</file>
+    <file>./SQL/PostgreSQL/18/select_network_usermode.sql</file>
+    <file>./SQL/PostgreSQL/18/select_nicks.sql</file>
+    <file>./SQL/PostgreSQL/18/select_persistent_channels.sql</file>
+    <file>./SQL/PostgreSQL/18/select_senderid.sql</file>
+    <file>./SQL/PostgreSQL/18/select_servers_for_network.sql</file>
+    <file>./SQL/PostgreSQL/18/select_userid.sql</file>
+    <file>./SQL/PostgreSQL/18/select_user_setting.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_000_quasseluser.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_010_sender.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_020_identity.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_030_identity_nick.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_040_network.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_050_buffer.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_060_backlog.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_070_coreinfo.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_080_ircservers.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_090_backlog_idx.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_100_user_setting.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_110_alter_sender_seq.sql</file>
+    <file>./SQL/PostgreSQL/18/setup_120_alter_messageid_seq.sql</file>
+    <file>./SQL/PostgreSQL/18/update_backlog_bufferid.sql</file>
+    <file>./SQL/PostgreSQL/18/update_buffer_lastseen.sql</file>
+    <file>./SQL/PostgreSQL/18/update_buffer_markerlinemsgid.sql</file>
+    <file>./SQL/PostgreSQL/18/update_buffer_name.sql</file>
+    <file>./SQL/PostgreSQL/18/update_buffer_persistent_channel.sql</file>
+    <file>./SQL/PostgreSQL/18/update_buffer_set_channel_key.sql</file>
+    <file>./SQL/PostgreSQL/18/update_identity.sql</file>
+    <file>./SQL/PostgreSQL/18/update_network_connected.sql</file>
+    <file>./SQL/PostgreSQL/18/update_network_set_awaymsg.sql</file>
+    <file>./SQL/PostgreSQL/18/update_network_set_usermode.sql</file>
+    <file>./SQL/PostgreSQL/18/update_network.sql</file>
+    <file>./SQL/PostgreSQL/18/update_username.sql</file>
+    <file>./SQL/PostgreSQL/18/update_userpassword.sql</file>
+    <file>./SQL/PostgreSQL/18/update_user_setting.sql</file>
+    <file>./SQL/PostgreSQL/18/upgrade_000_alter_ircserver_add_sslverify.sql</file>
 </qresource>
 </RCC>
index 34859c3..c8f57d1 100644 (file)
@@ -676,6 +676,7 @@ void SqliteStorage::bindServerInfo(QSqlQuery &query, const Network::Server &serv
     query.bindValue(":proxyport", server.proxyPort);
     query.bindValue(":proxyuser", server.proxyUser);
     query.bindValue(":proxypass", server.proxyPass);
+    query.bindValue(":sslverify", server.sslVerify ? 1 : 0);
 }
 
 
@@ -875,6 +876,7 @@ QList<NetworkInfo> SqliteStorage::networks(UserId user)
                         server.proxyPort = serversQuery.value(8).toUInt();
                         server.proxyUser = serversQuery.value(9).toString();
                         server.proxyPass = serversQuery.value(10).toString();
+                        server.sslVerify = serversQuery.value(11).toInt() == 1 ? true : false;
                         servers << server;
                     }
                     net.serverList = servers;
@@ -1977,6 +1979,7 @@ bool SqliteMigrationReader::readMo(IrcServerMO &ircserver)
     ircserver.proxyport = value(11).toInt();
     ircserver.proxyuser = value(12).toString();
     ircserver.proxypass = value(13).toString();
+    ircserver.sslverify = value(14).toInt() == 1 ? true : false;
     return true;
 }
 
index a04492e..318c1fe 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>421</width>
-    <height>275</height>
+    <height>307</height>
    </rect>
   </property>
   <property name="windowTitle">
       </item>
       <item>
        <widget class="QCheckBox" name="useSSL">
+        <property name="toolTip">
+         <string>Try to use an encrypted connection (e.g. SSL/TLS)</string>
+        </property>
         <property name="text">
-         <string>Use secure connection</string>
+         <string>Use encrypted connection</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="sslVerify">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="toolTip">
+         <string>&lt;p&gt;Verify the encrypted connection provides a valid certificate, increasing security.&lt;br/&gt;Uncheck if the IRC server uses a self-signed or invalid certificate.&lt;/p&gt;</string>
+        </property>
+        <property name="text">
+         <string>Verify connection security</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
         </property>
        </widget>
       </item>
   <tabstop>port</tabstop>
   <tabstop>serverPassword</tabstop>
   <tabstop>useSSL</tabstop>
+  <tabstop>sslVerify</tabstop>
   <tabstop>buttonBox</tabstop>
  </tabstops>
  <resources/>
index 5ba5502..cca20e7 100644 (file)
@@ -786,6 +786,25 @@ NetworkAddDlg::NetworkAddDlg(const QStringList &exist, QWidget *parent) : QDialo
     ui.setupUi(this);
     ui.useSSL->setIcon(QIcon::fromTheme("document-encrypt"));
 
+    if (Client::coreFeatures() & Quassel::VerifyServerSSL) {
+        // Synchronize requiring SSL with the use SSL checkbox
+        ui.sslVerify->setEnabled(ui.useSSL->isChecked());
+        connect(ui.useSSL, SIGNAL(toggled(bool)), ui.sslVerify, SLOT(setEnabled(bool)));
+    } else {
+        // Core isn't new enough to allow requiring SSL; disable checkbox and uncheck
+        ui.sslVerify->setEnabled(false);
+        ui.sslVerify->setChecked(false);
+        // Split up the message to allow re-using translations:
+        // [Original tool-tip]
+        // [Bold 'does not support feature' message]
+        // [Specific version needed and feature details]
+        ui.sslVerify->setToolTip(QString("%1<br/><b>%2</b><br/>%3").arg(
+                                       ui.sslVerify->toolTip(),
+                                       tr("Your Quassel core does not support this feature"),
+                                       tr("You need a Quassel core v0.13.0 or newer in order to "
+                                          "verify connection security.")));
+    }
+
     // read preset networks
     QStringList networks = PresetNetworks::names();
     foreach(QString s, existing)
@@ -807,7 +826,9 @@ NetworkInfo NetworkAddDlg::networkInfo() const
     if (ui.useManual->isChecked()) {
         NetworkInfo info;
         info.networkName = ui.networkName->text().trimmed();
-        info.serverList << Network::Server(ui.serverAddress->text().trimmed(), ui.port->value(), ui.serverPassword->text(), ui.useSSL->isChecked());
+        info.serverList << Network::Server(ui.serverAddress->text().trimmed(), ui.port->value(),
+                                           ui.serverPassword->text(), ui.useSSL->isChecked(),
+                                           ui.sslVerify->isChecked());
         return info;
     }
     else
@@ -869,6 +890,7 @@ ServerEditDlg::ServerEditDlg(const Network::Server &server, QWidget *parent) : Q
     ui.port->setValue(server.port);
     ui.password->setText(server.password);
     ui.useSSL->setChecked(server.useSsl);
+    ui.sslVerify->setChecked(server.sslVerify);
     ui.sslVersion->setCurrentIndex(server.sslVersion);
     ui.useProxy->setChecked(server.useProxy);
     ui.proxyType->setCurrentIndex(server.proxyType == QNetworkProxy::Socks5Proxy ? 0 : 1);
@@ -893,13 +915,33 @@ ServerEditDlg::ServerEditDlg(const Network::Server &server, QWidget *parent) : Q
         ui.sslVersion->hide();
     }
 
+    if (Client::coreFeatures() & Quassel::VerifyServerSSL) {
+        // Synchronize requiring SSL with the use SSL checkbox
+        ui.sslVerify->setEnabled(ui.useSSL->isChecked());
+        connect(ui.useSSL, SIGNAL(toggled(bool)), ui.sslVerify, SLOT(setEnabled(bool)));
+    } else {
+        // Core isn't new enough to allow requiring SSL; disable checkbox and uncheck
+        ui.sslVerify->setEnabled(false);
+        ui.sslVerify->setChecked(false);
+        // Split up the message to allow re-using translations:
+        // [Original tool-tip]
+        // [Bold 'does not support feature' message]
+        // [Specific version needed and feature details]
+        ui.sslVerify->setToolTip(QString("%1<br/><b>%2</b><br/>%3").arg(
+                                       ui.sslVerify->toolTip(),
+                                       tr("Your Quassel core does not support this feature"),
+                                       tr("You need a Quassel core v0.13.0 or newer in order to "
+                                          "verify connection security.")));
+    }
+
     on_host_textChanged();
 }
 
 
 Network::Server ServerEditDlg::serverData() const
 {
-    Network::Server server(ui.host->text().trimmed(), ui.port->value(), ui.password->text(), ui.useSSL->isChecked());
+    Network::Server server(ui.host->text().trimmed(), ui.port->value(), ui.password->text(),
+                           ui.useSSL->isChecked(), ui.sslVerify->isChecked());
     server.sslVersion = ui.sslVersion->currentIndex();
     server.useProxy = ui.useProxy->isChecked();
     server.proxyType = ui.proxyType->currentIndex() == 0 ? QNetworkProxy::Socks5Proxy : QNetworkProxy::HttpProxy;
index 2627f68..c05cee2 100644 (file)
@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>Edit Server</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout_3">
    <item>
          <property name="enabled">
           <bool>true</bool>
          </property>
+         <property name="toolTip">
+          <string>Try to use an encrypted connection (e.g. SSL/TLS)</string>
+         </property>
          <property name="text">
-          <string>Use SSL</string>
+          <string>Use encrypted connection</string>
          </property>
          <property name="icon">
           <iconset>
          </property>
         </widget>
        </item>
+       <item>
+        <widget class="QCheckBox" name="sslVerify">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+         <property name="toolTip">
+          <string>&lt;p&gt;Verify the encrypted connection provides a valid certificate, increasing security.&lt;br/&gt;Uncheck if the IRC server uses a self-signed or invalid certificate.&lt;/p&gt;</string>
+         </property>
+         <property name="text">
+          <string>Verify connection security</string>
+         </property>
+         <property name="checked">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
        <item>
         <spacer name="verticalSpacer_2">
          <property name="orientation">
   <tabstop>port</tabstop>
   <tabstop>password</tabstop>
   <tabstop>useSSL</tabstop>
+  <tabstop>sslVerify</tabstop>
   <tabstop>sslVersion</tabstop>
   <tabstop>useProxy</tabstop>
   <tabstop>proxyType</tabstop>