MCPcopy Create free account
hub / github.com/apache/arrow / ExampleTlsCertificateRoot

Function ExampleTlsCertificateRoot

cpp/src/arrow/flight/test_util.cc:300–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300Status ExampleTlsCertificateRoot(CertKeyPair* out) {
301 ARROW_ASSIGN_OR_RAISE(auto path, GetTestResourcePath("flight/root-ca.pem"));
302 try {
303 std::ifstream cert_file(path);
304 if (!cert_file) {
305 return Status::IOError("Could not open certificate: " + path);
306 }
307 std::stringstream cert;
308 cert << cert_file.rdbuf();
309 out->pem_cert = cert.str();
310 out->pem_key = "";
311 return Status::OK();
312 } catch (const std::ifstream::failure& e) {
313 return Status::IOError(e.what());
314 }
315}
316
317} // namespace arrow::flight

Callers 2

ASSERT_OK_AND_ASSIGNMethod · 0.85
TEST_FMethod · 0.85

Calls 4

IOErrorFunction · 0.85
strMethod · 0.80
OKFunction · 0.50
whatMethod · 0.45

Tested by

no test coverage detected