Commit 366f1a59 authored by Matthieu Tanon's avatar Matthieu Tanon

Fix ClearText security level management

parent 9d331de9
......@@ -335,8 +335,6 @@ ChatRoom::SecurityLevel ClientGroupChatRoom::getSecurityLevel () const {
lInfo() << "Chatroom SecurityLevel = Unsafe";
return level; // if one device is Unsafe the whole participant is Unsafe (red)
case AbstractChatRoom::SecurityLevel::ClearText:
lInfo() << "Chatroom SecurityLevel = ClearText";
return level; // TODO if all devices are in ClearText the whole participant is in ClearText (grey)
case AbstractChatRoom::SecurityLevel::Encrypted:
isSafe = false; // if one device is Encrypted the whole participant is Encrypted (orange)
break;
......
......@@ -476,11 +476,14 @@ AbstractChatRoom::SecurityLevel LimeV2::getSecurityLevel (const string &deviceId
lime::PeerDeviceStatus status = belleSipLimeManager->get_peerDeviceStatus(deviceId);
switch (status) {
case lime::PeerDeviceStatus::unknown:
return AbstractChatRoom::SecurityLevel::Encrypted;
cout << "LIMEv2 returning security level ClearText because device unknown" << endl;
return AbstractChatRoom::SecurityLevel::ClearText;
case lime::PeerDeviceStatus::untrusted:
return AbstractChatRoom::SecurityLevel::Encrypted;
case lime::PeerDeviceStatus::trusted:
return AbstractChatRoom::SecurityLevel::Safe;
case lime::PeerDeviceStatus::unsafe:
return AbstractChatRoom::SecurityLevel::Unsafe;
default:
return AbstractChatRoom::SecurityLevel::Unsafe;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment