MCPcopy Create free account
hub / github.com/apple/foundationdb / getCertificatePathSync

Method getCertificatePathSync

flow/TLSConfig.actor.cpp:171–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171std::string TLSConfig::getCertificatePathSync() const {
172 if (tlsCertPath.size()) {
173 return tlsCertPath;
174 }
175
176 std::string envCertPath;
177 if (platform::getEnvironmentVar("FDB_TLS_CERTIFICATE_FILE", envCertPath)) {
178 return envCertPath;
179 }
180
181 const char* defaultCertFileName = "fdb.pem";
182 if (fileExists(defaultCertFileName)) {
183 return defaultCertFileName;
184 }
185
186 if (fileExists(joinPath(platform::getDefaultConfigPath(), defaultCertFileName))) {
187 return joinPath(platform::getDefaultConfigPath(), defaultCertFileName);
188 }
189
190 return std::string();
191}
192
193std::string TLSConfig::getKeyPathSync() const {
194 if (tlsKeyPath.size()) {

Callers 4

loadAsyncMethod · 0.80
Net2.actor.cppFile · 0.80
initTLSMethod · 0.80
mainFunction · 0.80

Calls 5

getEnvironmentVarFunction · 0.85
fileExistsFunction · 0.85
getDefaultConfigPathFunction · 0.85
joinPathFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected