Change the logic to check the cert exchange is needed or not
Summary: It has been seen [here](https://fb.workplace.com/groups/flippersupport/permalink/1094276434386347/) that the user's app sandbox can be in a state where it might not have the device id information, but other app certificates. This causes the issue of "Timed out waiting for unknown device". We get the deviceid from flipper into app's sandbox when cert exchange happens. So if we don't have the device id information, we can again redo the cert exchange to get the sandbox in a state where flipper connects. Thus I updated the logic of `hasRequiredFiles` which checks the required files for cert exchange. Reviewed By: mweststrate Differential Revision: D27265693 fbshipit-source-id: ccf311f4728837ee9385c95c38f94c9c93380feb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d2fc10074f
commit
62863c8fe5
@@ -37,8 +37,10 @@ bool ConnectionContextStore::hasRequiredFiles() {
|
||||
loadStringFromFile(absoluteFilePath(CLIENT_CERT_FILE_NAME));
|
||||
std::string privateKey =
|
||||
loadStringFromFile(absoluteFilePath(PRIVATE_KEY_FILE));
|
||||
std::string config =
|
||||
loadStringFromFile(absoluteFilePath(CONNECTION_CONFIG_FILE));
|
||||
|
||||
if (caCert == "" || clientCert == "" || privateKey == "") {
|
||||
if (caCert == "" || clientCert == "" || privateKey == "" || config == "") {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user