Remove sendLegacyCertificateRequest

Summary:
Legacy certificate request is most likely deadcode by now. Remove it.

Changelog: Remove legacy certificate request

Reviewed By: antonk52

Differential Revision: D33707396

fbshipit-source-id: 47a410204bcd2ed843b716461df105ebc48264a6
This commit is contained in:
Lorenzo Blasa
2022-01-21 07:27:11 -08:00
committed by Facebook GitHub Bot
parent 43c3bd0edd
commit 76a9b3d3ae
2 changed files with 6 additions and 26 deletions

View File

@@ -413,16 +413,12 @@ void FlipperConnectionManagerImpl::requestSignedCertFromFlipper() {
return;
certificateExchangeCompleted_ = true;
if (isError) {
if (response.compare("not implemented")) {
auto error =
"Desktop failed to provide certificates. Error from flipper desktop:\n" +
response;
log(error);
gettingCert->fail(error);
client_ = nullptr;
} else {
sendLegacyCertificateRequest(message);
}
auto error =
"Desktop failed to provide certificates. Error from flipper desktop:\n" +
response;
log(error);
gettingCert->fail(error);
client_ = nullptr;
return;
}
if (!response.empty()) {
@@ -468,21 +464,6 @@ void FlipperConnectionManagerImpl::requestSignedCertFromFlipper() {
failedConnectionAttempts_ = 0;
}
void FlipperConnectionManagerImpl::sendLegacyCertificateRequest(
folly::dynamic message) {
// Desktop is using an old version of Flipper.
// Fall back to fireAndForget, instead of requestResponse.
auto sendingRequest =
flipperState_->start("Sending fallback certificate request");
client_->send(message, [this, sendingRequest]() {
sendingRequest->complete();
folly::dynamic config = folly::dynamic::object();
contextStore_->storeConnectionConfig(config);
client_ = nullptr;
});
}
/**
Check for the maximum number of failed socket connection attempts.
If exceeded, then swap the default socket provider. If the maximum

View File

@@ -86,7 +86,6 @@ class FlipperConnectionManagerImpl : public FlipperConnectionManager {
bool isCertificateExchangeNeeded();
void requestSignedCertFromFlipper();
bool isRunningInOwnThread();
void sendLegacyCertificateRequest(folly::dynamic message);
void reevaluateSocketProvider();
std::string getDeviceId();
};