diff --git a/src/app/constant/JamiStrings.qml b/src/app/constant/JamiStrings.qml index 8027a982fa1c8da80883e210100ca776ef2ce45e..6a6853a8438cffee18efe7693c5162d4eef2cd13 100644 --- a/src/app/constant/JamiStrings.qml +++ b/src/app/constant/JamiStrings.qml @@ -110,10 +110,7 @@ Item { property string verifyCertificatesClient: qsTr("Verify server TLS certificates") property string tlsRequireConnections: qsTr("Require certificate for incoming TLS connections") property string disableSecureDlgCheck: qsTr("Disable secure dialog check for incoming TLS data") - property string tlsProtocol: qsTr("TLS protocol method") property string audioDeviceSelector: qsTr("Audio input device selector") - property string tlsServerName: qsTr("TLS server name") - property string negotiationTimeOut: qsTr("Negotiation timeout (seconds)") property string selectPrivateKey: qsTr("Select a private key") property string selectUserCert: qsTr("Select a user certificate") property string selectCACert: qsTr("Select a CA certificate") diff --git a/src/app/currentaccount.cpp b/src/app/currentaccount.cpp index f5083f28006578d591b5165e615e95067e691323..b836e9106518433d75d1ef49e8eb2a18c0d59ba4 100644 --- a/src/app/currentaccount.cpp +++ b/src/app/currentaccount.cpp @@ -161,9 +161,6 @@ CurrentAccount::updateData() set_certificateFileTLS(accConfig.TLS.certificateFile, true); set_privateKeyFileTLS(accConfig.TLS.privateKeyFile, true); set_passwordTLS(accConfig.TLS.password, true); - set_serverNameTLS(accConfig.TLS.serverName, true); - set_methodTLS(accConfig.TLS.method, true); - set_negotiationTimeoutSecTLS(accConfig.TLS.negotiationTimeoutSec, true); // SRTP set_enableSRTP(accConfig.SRTP.enable, true); diff --git a/src/app/currentaccount.h b/src/app/currentaccount.h index 2ad1f7eaa533787b0929dcd7e476c898fb6a4bc5..c4d8246970a6e5d49f970a44311da2d149f59f19 100644 --- a/src/app/currentaccount.h +++ b/src/app/currentaccount.h @@ -157,9 +157,6 @@ class CurrentAccount final : public QObject QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(QString, certificateFile, TLS) QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(QString, privateKeyFile, TLS) QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(QString, password, TLS) - QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(QString, serverName, TLS) - QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(lrc::api::account::TlsMethod, method, TLS) - QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(int, negotiationTimeoutSec, TLS) // SRTP settings QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(bool, enable, SRTP) diff --git a/src/app/settingsview/components/AdvancedSIPSecuritySettings.qml b/src/app/settingsview/components/AdvancedSIPSecuritySettings.qml index a76d883478f739cd5eb9cfd1c410687b4c41a0f2..5cd631ba3ddd1367f2a2f0237a0391ea14924f7a 100644 --- a/src/app/settingsview/components/AdvancedSIPSecuritySettings.qml +++ b/src/app/settingsview/components/AdvancedSIPSecuritySettings.qml @@ -176,68 +176,5 @@ ColumnLayout { checked: CurrentAccount.disableSecureDlgCheck_TLS onSwitchToggled: CurrentAccount.disableSecureDlgCheck_TLS = checked } - - SettingsComboBox { - id: tlsProtocolComboBox - - Layout.fillWidth: true - - labelText: JamiStrings.tlsProtocol - comboModel: ListModel { - ListElement { - textDisplay: "Default" - firstArg: "Default" - secondArg: 0 - } - ListElement { - textDisplay: "TLSv1" - firstArg: "TLSv1" - secondArg: 1 - } - ListElement { - textDisplay: "TLSv1.1" - firstArg: "TLSv1.1" - secondArg: 2 - } - ListElement { - textDisplay: "TLSv1.2" - firstArg: "TLSv1.2" - secondArg: 3 - } - } - widthOfComboBox: root.itemWidth - tipText: JamiStrings.audioDeviceSelector - role: "textDisplay" - - modelIndex: CurrentAccount.method_TLS - - onActivated: CurrentAccount.method_TLS = parseInt(comboModel.get(modelIndex).secondArg) - } - - SettingsMaterialTextEdit { - id: outgoingTLSServerNameLineEdit - - Layout.fillWidth: true - itemWidth: root.itemWidth - titleField: JamiStrings.tlsServerName - - staticText: CurrentAccount.serverName_TLS - - onEditFinished: CurrentAccount.serverName_TLS = dynamicText - } - - SettingSpinBox { - id: negotiationTimeoutSpinBox - Layout.fillWidth: true - - title: JamiStrings.negotiationTimeOut - itemWidth: root.itemWidth - bottomValue: 0 - topValue: 3000 - - valueField: CurrentAccount.negotiationTimeoutSec_TLS - - onNewValue: CurrentAccount.negotiationTimeoutSec_TLS = valueField - } } } diff --git a/src/libclient/accountmodel.cpp b/src/libclient/accountmodel.cpp index 3bf692718292a053181ed79565a80f650e8acc22..1669a49a937955a5fde03d773340cadf0def1dd6 100644 --- a/src/libclient/accountmodel.cpp +++ b/src/libclient/accountmodel.cpp @@ -912,26 +912,12 @@ account::Info::fromDetails(const MapStringString& details) confProperties.TLS.certificateFile = details[ConfProperties::TLS::CERTIFICATE_FILE]; confProperties.TLS.privateKeyFile = details[ConfProperties::TLS::PRIVATE_KEY_FILE]; confProperties.TLS.password = details[ConfProperties::TLS::PASSWORD]; - auto method = toStdString(details[ConfProperties::TLS::METHOD]); - if (method == "TLSv1") { - confProperties.TLS.method = account::TlsMethod::TLSv1; - } else if (method == "TLSv1.1") { - confProperties.TLS.method = account::TlsMethod::TLSv1_1; - } else if (method == "TLSv1.2") { - confProperties.TLS.method = account::TlsMethod::TLSv1_2; - } else { - confProperties.TLS.method = account::TlsMethod::DEFAULT; - } - confProperties.TLS.ciphers = details[ConfProperties::TLS::CIPHERS]; - confProperties.TLS.serverName = details[ConfProperties::TLS::SERVER_NAME]; confProperties.TLS.verifyServer = toBool(details[ConfProperties::TLS::VERIFY_SERVER]); confProperties.TLS.verifyClient = toBool(details[ConfProperties::TLS::VERIFY_CLIENT]); confProperties.TLS.requireClientCertificate = toBool( details[ConfProperties::TLS::REQUIRE_CLIENT_CERTIFICATE]); confProperties.TLS.disableSecureDlgCheck = toBool( details[ConfProperties::TLS::DISABLE_SECURE_DLG_CHECK]); - confProperties.TLS.negotiationTimeoutSec = toInt( - details[ConfProperties::TLS::NEGOTIATION_TIMEOUT_SEC]); // DHT confProperties.DHT.port = toInt(details[ConfProperties::DHT::PORT]); confProperties.DHT.PublicInCalls = toBool(details[ConfProperties::DHT::PUBLIC_IN_CALLS]); @@ -1031,31 +1017,12 @@ account::ConfProperties_t::toDetails() const details[ConfProperties::TLS::CERTIFICATE_FILE] = this->TLS.certificateFile; details[ConfProperties::TLS::PRIVATE_KEY_FILE] = this->TLS.privateKeyFile; details[ConfProperties::TLS::PASSWORD] = this->TLS.password; - switch (this->TLS.method) { - case account::TlsMethod::TLSv1: - details[ConfProperties::TLS::METHOD] = "TLSv1"; - break; - case account::TlsMethod::TLSv1_1: - details[ConfProperties::TLS::METHOD] = "TLSv1.1"; - break; - case account::TlsMethod::TLSv1_2: - details[ConfProperties::TLS::METHOD] = "TLSv1.2"; - break; - case account::TlsMethod::DEFAULT: - default: - details[ConfProperties::TLS::METHOD] = "Default"; - break; - } - details[ConfProperties::TLS::CIPHERS] = this->TLS.ciphers; - details[ConfProperties::TLS::SERVER_NAME] = this->TLS.serverName; details[ConfProperties::TLS::VERIFY_SERVER] = toQString(this->TLS.verifyServer); details[ConfProperties::TLS::VERIFY_CLIENT] = toQString(this->TLS.verifyClient); details[ConfProperties::TLS::REQUIRE_CLIENT_CERTIFICATE] = toQString( this->TLS.requireClientCertificate); details[ConfProperties::TLS::DISABLE_SECURE_DLG_CHECK] = toQString( this->TLS.disableSecureDlgCheck); - details[ConfProperties::TLS::NEGOTIATION_TIMEOUT_SEC] = toQString( - this->TLS.negotiationTimeoutSec); // DHT details[ConfProperties::DHT::PORT] = toQString(this->DHT.port); details[ConfProperties::DHT::PUBLIC_IN_CALLS] = toQString(this->DHT.PublicInCalls); diff --git a/src/libclient/api/account.h b/src/libclient/api/account.h index 836110575be0de2477b85ac680a3ef08517744e0..58701dd3eee86b865acbd577a433722a9ffab959 100644 --- a/src/libclient/api/account.h +++ b/src/libclient/api/account.h @@ -74,9 +74,6 @@ to_status(const QString& type) enum class KeyExchangeProtocol { NONE, SDES }; Q_ENUM_NS(KeyExchangeProtocol) -enum class TlsMethod { DEFAULT, TLSv1, TLSv1_1, TLSv1_2 }; -Q_ENUM_NS(TlsMethod) - struct ConfProperties_t { QString mailbox; @@ -171,14 +168,10 @@ struct ConfProperties_t QString certificateFile; QString privateKeyFile; QString password; - TlsMethod method; - QString ciphers; - QString serverName; bool verifyServer; bool verifyClient; bool requireClientCertificate; bool disableSecureDlgCheck; - int negotiationTimeoutSec; } TLS; struct DHT_t {