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
This commit is contained in:
Michel Weststrate
2020-10-13 02:59:07 -07:00
committed by Facebook GitHub Bot
parent 05f4c0f54f
commit ffbccf2331
3 changed files with 13 additions and 1 deletions

View File

@@ -14,6 +14,9 @@
#include <openssl/rsa.h> #include <openssl/rsa.h>
#include <cstring> #include <cstring>
namespace facebook {
namespace flipper {
void free( void free(
EVP_PKEY* pKey, EVP_PKEY* pKey,
X509_REQ* x509_req, X509_REQ* x509_req,
@@ -222,3 +225,6 @@ void free(
BIO_free_all(privateKey); BIO_free_all(privateKey);
BIO_free_all(csrBio); BIO_free_all(csrBio);
} }
} // namespace flipper
} // namespace facebook

View File

@@ -12,9 +12,15 @@
#include <openssl/rsa.h> #include <openssl/rsa.h>
#include <stdio.h> #include <stdio.h>
namespace facebook {
namespace flipper {
bool generateCertSigningRequest( bool generateCertSigningRequest(
const char* appId, const char* appId,
const char* csrFile, const char* csrFile,
const char* privateKeyFile); const char* privateKeyFile);
} // namespace flipper
} // namespace facebook
#endif /* CertificateUtils_hpp */ #endif /* CertificateUtils_hpp */

View File

@@ -57,7 +57,7 @@ std::string ConnectionContextStore::getCertificateSigningRequest() {
// Clean all state and generate a new one // Clean all state and generate a new one
resetState(); resetState();
bool success = generateCertSigningRequest( bool success = facebook::flipper::generateCertSigningRequest(
deviceData_.appId.c_str(), deviceData_.appId.c_str(),
absoluteFilePath(CSR_FILE_NAME).c_str(), absoluteFilePath(CSR_FILE_NAME).c_str(),
absoluteFilePath(PRIVATE_KEY_FILE).c_str()); absoluteFilePath(PRIVATE_KEY_FILE).c_str());