From 216c926ca5712912243512c5fc68358e393655af Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Thu, 12 May 2022 09:16:13 -0700 Subject: [PATCH] Remove dead code in connection context store Summary: ^ It was used by rsocket. Reviewed By: fabiomassimo Differential Revision: D36246038 fbshipit-source-id: 8bdc77d9e1ecf22402436e0102b5522ed36aff27 --- xplat/Flipper/ConnectionContextStore.cpp | 14 -------------- xplat/Flipper/ConnectionContextStore.h | 2 -- xplat/FlipperTestLib/ConnectionContextStoreMock.h | 3 --- 3 files changed, 19 deletions(-) diff --git a/xplat/Flipper/ConnectionContextStore.cpp b/xplat/Flipper/ConnectionContextStore.cpp index c661c657a..fa3511a5f 100644 --- a/xplat/Flipper/ConnectionContextStore.cpp +++ b/xplat/Flipper/ConnectionContextStore.cpp @@ -80,20 +80,6 @@ std::string ConnectionContextStore::getCertificateSigningRequest() { return csr; } -std::shared_ptr ConnectionContextStore::getSSLContext() { - std::shared_ptr sslContext = - std::make_shared(); - sslContext->loadTrustedCertificates( - absoluteFilePath(FLIPPER_CA_FILE_NAME).c_str()); - sslContext->setVerificationOption( - folly::SSLContext::SSLVerifyPeerEnum::VERIFY); - sslContext->loadCertKeyPairFromFiles( - absoluteFilePath(CLIENT_CERT_FILE_NAME).c_str(), - absoluteFilePath(PRIVATE_KEY_FILE).c_str()); - sslContext->authenticate(true, false); - return sslContext; -} - std::string ConnectionContextStore::getDeviceId() { /* On android we can't reliably get the serial of the current device So rely on our locally written config, which is provided by the diff --git a/xplat/Flipper/ConnectionContextStore.h b/xplat/Flipper/ConnectionContextStore.h index be551b555..f5fdcc2c8 100644 --- a/xplat/Flipper/ConnectionContextStore.h +++ b/xplat/Flipper/ConnectionContextStore.h @@ -9,7 +9,6 @@ #include #include -#include #include #include "FlipperCertificateExchangeMedium.h" #include "FlipperInitConfig.h" @@ -30,7 +29,6 @@ class ConnectionContextStore { ConnectionContextStore(DeviceData deviceData); bool hasRequiredFiles(); std::string getCertificateSigningRequest(); - std::shared_ptr getSSLContext(); std::string getCertificateDirectoryPath(); std::string getCACertificatePath(); std::string getDeviceId(); diff --git a/xplat/FlipperTestLib/ConnectionContextStoreMock.h b/xplat/FlipperTestLib/ConnectionContextStoreMock.h index bfd1694c4..a44919f4f 100644 --- a/xplat/FlipperTestLib/ConnectionContextStoreMock.h +++ b/xplat/FlipperTestLib/ConnectionContextStoreMock.h @@ -20,9 +20,6 @@ class ConnectionContextStoreMock : public ConnectionContextStore { std::string createCertificateSigningRequest() { return "thisIsACsr"; } - std::shared_ptr getSSLContext() { - return nullptr; - } folly::dynamic getConnectionConfig() { return nullptr; }