Skip to content

Commit

Permalink
fix OSS test cert discovery
Browse files Browse the repository at this point in the history
Summary: Enable finding folly test certs in cmake build via folly_test_util FOLLY_CERTS_DIR rather than hardcoding the path so that the certs can be found. The define already existed but was not set/used in the cmake build

Reviewed By: bigfootjon

Differential Revision: D66074308

fbshipit-source-id: 22417237f1341918b3e02f52fe093ab1d38683d9
  • Loading branch information
ahornby authored and facebook-github-bot committed Nov 18, 2024
1 parent 1153733 commit 4e0f677
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions wangle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ if(BUILD_TESTS)
)
target_link_libraries(
${test_name}
Folly::folly_test_util
wangle
${LIBGMOCK_LIBRARIES}
${LIBEVENT_LIB}
Expand Down
10 changes: 7 additions & 3 deletions wangle/ssl/test/SSLContextManagerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ std::string get_resource(const char* res) {
}
} // namespace

const char* kClientTestChain = "folly/io/async/test/certs/client_chain.pem";
const char* kClientTestCert = "folly/io/async/test/certs/client_cert.pem";
const char* kTestCert = "folly/io/async/test/certs/tests-cert.pem";
#if !defined(FOLLY_CERTS_DIR)
#define FOLLY_CERTS_DIR "folly/io/async/test/certs"
#endif

const char* kClientTestChain = FOLLY_CERTS_DIR "/client_chain.pem";
const char* kClientTestCert = FOLLY_CERTS_DIR "/client_cert.pem";
const char* kTestCert = FOLLY_CERTS_DIR "/tests-cert.pem";
#endif

using std::shared_ptr;
Expand Down

0 comments on commit 4e0f677

Please sign in to comment.