From ffbccf23318d2ccbdb6b55e4fb936d0beb7e9a6d Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Tue, 13 Oct 2020 02:59:07 -0700 Subject: [PATCH] Fixed more missing namespaces Summary: See the previous diffs, we pollute the global namespace here and there. Found some more missing namespace wrappers. Tried to wrap `FlipperStep` as well, which passed tests but gave weird linking errors in Wilde, so reverted that part (the name is not very ambiguous anyway) Reviewed By: cekkaewnumchai Differential Revision: D24193109 fbshipit-source-id: 111c479e421fdb321e898f948586229f30a7d777 --- xplat/Flipper/CertificateUtils.cpp | 6 ++++++ xplat/Flipper/CertificateUtils.h | 6 ++++++ xplat/Flipper/ConnectionContextStore.cpp | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/xplat/Flipper/CertificateUtils.cpp b/xplat/Flipper/CertificateUtils.cpp index 1e81f721c..e39e089ef 100644 --- a/xplat/Flipper/CertificateUtils.cpp +++ b/xplat/Flipper/CertificateUtils.cpp @@ -14,6 +14,9 @@ #include #include +namespace facebook { +namespace flipper { + void free( EVP_PKEY* pKey, X509_REQ* x509_req, @@ -222,3 +225,6 @@ void free( BIO_free_all(privateKey); BIO_free_all(csrBio); } + +} // namespace flipper +} // namespace facebook diff --git a/xplat/Flipper/CertificateUtils.h b/xplat/Flipper/CertificateUtils.h index a982f3fdd..180a78407 100644 --- a/xplat/Flipper/CertificateUtils.h +++ b/xplat/Flipper/CertificateUtils.h @@ -12,9 +12,15 @@ #include #include +namespace facebook { +namespace flipper { + bool generateCertSigningRequest( const char* appId, const char* csrFile, const char* privateKeyFile); +} // namespace flipper +} // namespace facebook + #endif /* CertificateUtils_hpp */ diff --git a/xplat/Flipper/ConnectionContextStore.cpp b/xplat/Flipper/ConnectionContextStore.cpp index 59c3d4a3d..1c28f60f4 100644 --- a/xplat/Flipper/ConnectionContextStore.cpp +++ b/xplat/Flipper/ConnectionContextStore.cpp @@ -57,7 +57,7 @@ std::string ConnectionContextStore::getCertificateSigningRequest() { // Clean all state and generate a new one resetState(); - bool success = generateCertSigningRequest( + bool success = facebook::flipper::generateCertSigningRequest( deviceData_.appId.c_str(), absoluteFilePath(CSR_FILE_NAME).c_str(), absoluteFilePath(PRIVATE_KEY_FILE).c_str());