diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp index cbd16d7f649a2f3f75f2446e511aaa291d406ce3..52d78fe6870ab59ea1658da9290e98c4d4968d14 100644 --- a/src/ringdht/ringaccount.cpp +++ b/src/ringdht/ringaccount.cpp @@ -509,6 +509,22 @@ std::map<std::string, std::string> RingAccount::getAccountDetails() const { std::map<std::string, std::string> a = SIPAccountBase::getAccountDetails(); a.emplace(Conf::CONFIG_DHT_PORT, ring::to_string(dhtPort_)); + + /* these settings cannot be changed (read only), but clients should still be + * able to read what they are */ + a.emplace(Conf::CONFIG_SRTP_KEY_EXCHANGE, sip_utils::getKeyExchangeName(getSrtpKeyExchange())); + a.emplace(Conf::CONFIG_SRTP_ENABLE, isSrtpEnabled() ? TRUE_STR : FALSE_STR); + a.emplace(Conf::CONFIG_SRTP_RTP_FALLBACK, getSrtpFallback() ? TRUE_STR : FALSE_STR); + + a.emplace(Conf::CONFIG_TLS_METHOD, "Automatic"); + a.emplace(Conf::CONFIG_TLS_CIPHERS, ""); + a.emplace(Conf::CONFIG_TLS_SERVER_NAME, ""); + a.emplace(Conf::CONFIG_TLS_VERIFY_SERVER, TRUE_STR); + a.emplace(Conf::CONFIG_TLS_VERIFY_CLIENT, TRUE_STR); + a.emplace(Conf::CONFIG_TLS_REQUIRE_CLIENT_CERTIFICATE, TRUE_STR); + /* GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT is defined as -1 */ + a.emplace(Conf::CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC, "-1"); + return a; } diff --git a/src/ringdht/ringaccount.h b/src/ringdht/ringaccount.h index 91f6cae5989d804f39da4583e46bbcb0ae18af31..9f853fce636d8c828df81d9beb5bd2ba32d8df53 100644 --- a/src/ringdht/ringaccount.h +++ b/src/ringdht/ringaccount.h @@ -237,6 +237,10 @@ class RingAccount : public SIPAccountBase { return true; } + virtual bool isSrtpEnabled() const { + return true; + } + virtual sip_utils::KeyExchangeProtocol getSrtpKeyExchange() const { return sip_utils::KeyExchangeProtocol::SDES; }