Discarding message from invalid peer certificate
Describe your environment
- Device model:
1. Device A : Samsung SM-T720, Android 11 API 30, Master (3f87565cc46ca68a6c9c38154d09416f30c766a0)
2. Device B : Ubuntu 22.04.2 LTS, Ubuntu Software v202304121408
Steps to reproduce
- Can you reproduce the bug: at will
- Steps:
- Create new account with device B 2. Quickly send friend invite to device A (if I wait like 30s I don't have the bug anymore)
- Actual result: Device A doesnt receive the friend invite. I get some logs telling it didnt work.
Additional information
2023-05-01 11:43:33.145 22549-22746 libjami cx.ring W [1682955813.145|22746|account_manager.cpp :337 ] Found invalid peer device: 89879ec18abb54e187cb34bbab78cec3d76929dc15017499bcdb5316f5e581a0
2023-05-01 11:43:33.146 22549-22746 libjami cx.ring W [1682955813.146|22746|account_manager.cpp :385 ] [Auth] Discarding message from invalid peer certificate
2023-05-01 11:43:33.152 22549-22746 libjami cx.ring W [1682955813.152|22746|account_manager.cpp :337 ] Found invalid peer device: 89879ec18abb54e187cb34bbab78cec3d76929dc15017499bcdb5316f5e581a0
2023-05-01 11:43:33.152 22549-22746 libjami cx.ring W [1682955813.152|22746|account_manager.cpp :385 ] [Auth] Discarding message from invalid peer certificate
Notes
(Sébastien):
This may be due to the fact than the device key is not present on the DHT during the first seconds. So, the Android device will not find any certificate when receiving the trust request.
One possible solution would be to wait that deviceAnnounced_ is true before sending trust request or other DHT values.
Edited by Sébastien Blin