Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
e1fe926b
Commit
e1fe926b
authored
Jun 16, 2020
by
Sylvain Berfini
🐮
Browse files
Fixed chat room security level when instanciated
parent
87cb164a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
src/chat/chat-room/client-group-chat-room.cpp
src/chat/chat-room/client-group-chat-room.cpp
+6
-0
tester/group_chat_tester.c
tester/group_chat_tester.c
+3
-1
No files found.
src/chat/chat-room/client-group-chat-room.cpp
View file @
e1fe926b
...
...
@@ -379,6 +379,12 @@ ChatRoom::SecurityLevel ClientGroupChatRoom::getSecurityLevel () const {
if
(
!
(
d
->
capabilities
&
ClientGroupChatRoom
::
Capabilities
::
Encrypted
))
{
return
AbstractChatRoom
::
SecurityLevel
::
ClearText
;
}
// Until participant list & self devices list is populated, don't assume chat room is safe but encrypted
if
(
getParticipants
().
size
()
==
0
&&
getMe
()
->
getPrivate
()
->
getDevices
().
size
()
==
0
)
{
lInfo
()
<<
"Chatroom SecurityLevel = Encrypted"
;
return
AbstractChatRoom
::
SecurityLevel
::
Encrypted
;
}
bool
isSafe
=
true
;
// check other participants
...
...
tester/group_chat_tester.c
View file @
e1fe926b
...
...
@@ -429,8 +429,10 @@ LinphoneChatRoom * create_chat_room_client_side_with_expected_number_of_particip
if
(
!
chatRoom
)
return
NULL
;
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
lcm
->
stat
.
number_of_LinphoneChatRoomStateInstantiated
,
initialStats
->
number_of_LinphoneChatRoomStateInstantiated
+
1
,
100
));
if
(
encrypted
)
if
(
encrypted
)
{
BC_ASSERT_EQUAL
(
linphone_chat_room_get_security_level
(
chatRoom
),
LinphoneChatRoomSecurityLevelEncrypted
,
LinphoneChatRoomSecurityLevel
,
"%i"
);
BC_ASSERT_TRUE
(
linphone_chat_room_get_capabilities
(
chatRoom
)
&
LinphoneChatRoomCapabilitiesEncrypted
);
}
// Check that the chat room is correctly created on Marie's side and that the participants are added
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
lcm
->
stat
.
number_of_LinphoneChatRoomStateCreationPending
,
initialStats
->
number_of_LinphoneChatRoomStateCreationPending
+
1
,
5000
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment