Skip to content

Commit

Permalink
fix path conversion to c-str in SSLSessionTest
Browse files Browse the repository at this point in the history
Summary: On Windows, `boost::filesystem::path::c_str()` has type `wchar_t const*` and not `char const*`; passing the result to `SSLContext` members does not compile.

Reviewed By: vitaut

Differential Revision: D57167715
  • Loading branch information
yfeldblum authored and facebook-github-bot committed May 9, 2024
1 parent 30539b0 commit 54e97af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions folly/io/async/test/SSLSessionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ class SSLSessionTest : public testing::Test {
std::shared_ptr<folly::SSLContext> clientCtx,
std::shared_ptr<folly::SSLContext> serverCtx) {
clientCtx->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
clientCtx->loadTrustedCertificates(find_resource(kTestCA).c_str());
clientCtx->loadTrustedCertificates(find_resource(kTestCA).string().c_str());

serverCtx->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
serverCtx->loadCertificate(find_resource(kTestCert).c_str());
serverCtx->loadPrivateKey(find_resource(kTestKey).c_str());
serverCtx->loadCertificate(find_resource(kTestCert).string().c_str());
serverCtx->loadPrivateKey(find_resource(kTestKey).string().c_str());
}

folly::EventBase eventBase_;
Expand Down

0 comments on commit 54e97af

Please sign in to comment.